Image Optimizer
Last updated 2025-09-16
The Fastly Image Optimizer (Fastly IO) is a real-time image transformation and optimization service that caches and serves pixel-optimized, bandwidth-efficient images requested from your origin server. Fastly IO specifically supports a variety of input and output image formats.
Image transformation and optimization
When an image is requested from your origin server, Fastly IO can perform transformation tasks before serving and caching the optimized version. Image transformations can be applied programmatically and through dynamic URLs in real-time. You can make images responsive so they automatically adjust to fit the size of the screen viewing the content. As a result, image pre-processing can be offloaded to the edge. Multiple copies of the images, each appropriately sized for different devices, are served from cache instead, which allows you to reduce the number of requests to your origin.
Debugging and troubleshooting
To aid in debugging when serving images, special HTTP headers will be present in a response when an image is requested. The specific header included depends on the response's result. For successful transformations and optimizations, the HTTP header returned provides general information that allows you to compare image dimensions, file sizes, and formats. Additional HTTP headers are included for source image issues that aren't fatal enough to cause an error but could still be problematic, as well as transformations and optimizations that fail outright.
Billing
NOTE
Billing limits for this product may be different if you've purchased a packaged offering or are using a product or feature trial.
Billing for Fastly IO is based on the number of monthly image requests that are processed and delivered. On most accounts, anyone assigned the role of superuser can purchase this product from the Fastly control panel. If you have not been assigned that role, you can use the control panel to request that a superuser purchase it for you.
Some features like AVIF and JPEGXL encoding format, may require an account upgrade. Existing customers can contact sales@fastly.com for more information on pricing, features, and account upgrades.
How image requests are calculated
Note the following about how we count image requests:
- An image request is any request that triggers the
req.http.x-fastly-imageopto-api
header. - When using the animated GIF to video functionality, each image frame delivered as video is counted as an image request.
- Services using shielding will (in many cases) execute their edge code twice: once at the edge location and once at the shield location. An image request is counted both times.
- Only send image content through Fastly IO. Non-image content can't be optimized using it, but will still be counted and charged as an image request.
This article describes a product that may use third-party cloud infrastructure to process or store content or requests for content. For more information, check out our cloud infrastructure security and compliance program.