What is image stack?
Image Stack is a paid option for optimizing images in JPG and PNG formats (mime-type: image/jpeg, image/png) on the fly. The original images remain unchanged but their versions in the CDN cache change according to your requirements. The Image Stack option includes the following features:- Quality allows you to set the quality level for your images by lowering it to the specified value. The file size of images also decreases, so users will get them faster.
- Compression converts images to WebP and AVIF formats providing up to 55% file size savings at a given quality level.
- Resize allows you to reduce the height, width, and scale of your original image.
- Crop allows you to cut off the excessive image area beyond the established parameters.


- Format: jpg
- Quality: 100%
- Size: 3.55 MB
- W×H: 553×743 px
How image stack works
If you use Image Stack requests for images that will be proxied through our Processing Server, it takes an original image from your Origin Server and converts the image to WebP or applies others features. After that, a new version of the image will be saved in the Caching Server and sent to end users.
- X-Img-Operations : operations performed
- X-Img-Origin-Download-Time : time to download an image from an origin in milliseconds
- X-Img-Origin-Size : original image size in bytes
- X-Img-Processing-Time : time taken to convert in milliseconds
- X-Img-Saved-Bytes : how many bytes the image size is reduced by after processing
- X-Img-Server : the server that has converted the image
- Img-Skip-Reason : the reason why an operation wasn’t performed
- Resizing
- Cropping
- Compression to WebP and AVIF with changing quality
When images cannot be processed
If an image cannot be processed, an end user will receive the original image downloaded into the CDN cache from the Origin Server. We will serve original images in the following cases:- The original image quality is lower than the target quality. For instance, if the original quality is 45 and the target is 80, the image size after processing will increase rather than decrease.
- Gzip compression is applied to the original images. If the image is already compressed by Gzip (contains the HTTP header Content-Encoding: gzip), Image Stack cannot unzip the original image.
- The end-user browser doesn’t support the target format (WebP, AVIF). If HTTP headers don’t contain the values image/webp or image/avif, it means that the browser does not support WebP or AVIF formats.
- The image has a format that Image Stack doesn’t support. If you want to convert files with extensions other than JPG and PNG (e. g., GIF), Image Stack will not be able to process them.
