Hear from Slack, the ACLU, TED, & more at our customer summit in San Francisco Register

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.
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: