LOG IN SIGN UP
Documentation

Fastly Image Optimizer

The Fastly Image Optimizer is a real-time image manipulation and optimization service that drastically speeds up image delivery by serving pixel perfect, bandwidth efficient images to internet users, whatever device they are using.

Image API reference

Name Parameter Notes
Width width Resize the width of the image.
Height height Resize the height of the image.
Pixel Ratio dpr Serve correctly sized images for devices that expose a device pixel ratio.
Fit Mode fit Set how the image will fit within the size bounds provided.
Crop crop Remove pixels from an image.
Trim trim Remove pixels from the edge of an image.
Pad pad Add pixels to the edge of an image.
Canvas canvas Increase the size of the canvas around an image.
Background Color bg-color Set the background color of an image.
Orientation orient Change the cardinal orientation of the image.
Overlay overlay Overlay one image on top of another image.
Overlay Align overlay-align Set the position of the overlay image.
Overlay Repeat overlay-repeat Set how the overlay image will be repeated.
Overlay Width overlay-width Set the width of the overlay image.
Overlay Height overlay-height Set the height of the overlay image.
Overlay Pad overlay-pad Add padding to the edge of the overlay image.
Brightness brightness Set the brightness of the output image.
Contrast contrast Set the contrast of the output image.
Saturation saturation Set the saturation of the output image.
Sharpen sharpen Set the sharpness of the output image.
Blur blur Set the blurriness of the output image.
Format format Specify the output format to convert the image to.
Frame frame Extract the first frame from an animated image sequence.
Quality quality Optimize the image to the given compression level for lossy file formatted images.
Auto auto Enable optimizations features automatically.
Enable enable Enable functionality that is disabled by default.
Disable disable Disable functionality that is enabled by default.
Resize Filter resize-filter Specify the resize filter used when resizing images.
Montage see docs Combine up to four images into a single displayed image.

Additional resources: