Image Optimizer

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.

overview of the Fastly Image Optimizer

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 image requests that Image Optimizer processes and delivers for you. A request becomes a billable IO request when your service configuration invokes Image Optimizer.

What triggers a billable IO request

Billing triggers differ depending on whether you are using a VCL service or a Compute service:

  • VCL services: Any request that sets the req.http.X-Fastly-Imageopto-Api header is counted as a billable image request. Services using shielding may execute their edge logic twice—once at the edge POP and once at the shield POP. Both executions count as billable image requests.
  • Compute services: Image Optimizer can be accessed through Compute SDKs as part of Fastly's Beta program. Any request sent to Image Optimizer, including requests made through the SDKs such as Request::with_image_optimizer, counts as a billable image request.

How image requests are counted

Once Image Optimizer is invoked, we count image requests as follows:

  • Image Optimizer requests are billed whether there is a cache HIT or MISS.
  • When using animated GIF-to-video functionality, each frame delivered as video counts as a separate image request. GIF-to-GIF transformations count as one request.
  • Non-image content cannot be optimized, but will still be counted as an image request if it is sent through Image Optimizer. Only send image content through IO.

Purchasing

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, such as AVIF and JPEGXL encoding format, may require an account upgrade. Existing customers can contact sales@fastly.com for details about pricing, features, and upgrade options.

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.