Click the edit button next to text-based files and images to open the asset editor.

Editing Text Files

Edit your text assets using the same CodePen editing experience you know & love! You can even edit Assets right within the Pen Editor:

Editing & Optimizing Images

Resize, rotate, and adjust quality in the new image editor without changing the original image! Make your tweaks then save as a new image or copy the optimized URL to get a dynamic served version of your image.

Image Transformations

You can manually add these URL parameters to your CodePen hosted images, or use the image editor to get great visual of the available URL parameters. The parameters can always be adjusted later in your code.

KeyValueDescription
widthNumberDesired width of the image
heightNumberDesired height of the image
fitscale-down|cover|padControl how the image fits into the given width/heightscale-down keeps the aspect ratio. cover and pad size at the exact given width & height, with cover filling the whole canvas with the image and pad scaling the image down to fit within the canvas.
rotate0|90|180|270Direction to rotate the image
formatautoAutomatically convert the JPG, GIF and PNG images to WebP if the browser supports it, otherwise the original format is returned.
qualityNumber from 0 to 100Adjust the quality to get a smaller filesize through lossy compression. This setting only applies to JPEG, GIF, and WebP images.

Examples of the Image Asset URL Parameters