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.
Format format Specify the output format to convert the image to.
Quality quality Optimize the image to the given compression level for lossy file formatted images.
Auto auto Enable optimizations features automatically.
Disable disable Disable functionality that is active by default.
Resize Filter resize-filter Specify the resize filter used when resizing images.

Additional resources: