Gather information using Piez
Gather information using Piez
Piez is a Google Chrome extension that reports key optimization details for webpages that are already using Image and Video Manager. Piez can help you to gather additional information about your pristine images and videos and the derivatives generated through the optimization process.
Use Piez to:
-
Determine the number of images and videos optimized on a webpage, the total bytes saved, and the percentage reduction in bytes
-
Find the byte size of a pristine image or video
-
Find the byte size and format of a derivative image or video
-
Determine whether the processed image or video has been real-time or offline optimized
-
Real-time means that a quick and simple transformation has been performed on the pristine image or video to transform it to a single format (for example, JPEG only). This delivers some byte savings without leveraging the full capabilities of Image and Video Manager.
-
Optimized (offline) means the pristine image has been run through a more sophisticated offline process that converts and compresses the original image into a more comprehensive set of outputs that are optimized to support various browser and device combinations (for example, WEBP, JP2, and so on).
-
Gather information using the HTTP request header
If you do not want to use the Piez extension because you're using a web browser other than Google Chrome, or you simply do not want to install it, you can get the same information by using the x-im-piez: on.
Sample Request: curl -IXGET -H "x-im-piez: on"
https://im.web.retaildemo.com/retail_files/jacket.jpg
The Reponse header contain s the following information about your images and videos.
Response header | Information provided |
---|---|
cache-control | If the downstream TTL behavior has been configured so that max-age is based on the the edge TTL, then a lower max-age (for example, 900s) indicates the image or video is a real-time derivative |
content-type | The type of media, for example, "image/jpeg" |
server | If the server is "Akamai Image Server", then the processed image is a real-time derivative; if the server is "Akamai Image Manager", then the processed image is an optimized (offline) derivative |
x-im-encoding-quality | The encoding quality used to generate the image or video |
x-im-file-name | The Image and Video Manager policy, its version, the derivative image width and the file type (policy.version.width.filetype, for example, "auto.5.2880.chrome") |
x-im-lunatoken | The Image and Video Manager API Token value applied to the request |
x-im-original-format | The format of the original pristine image or video, for example, "image/jpeg" |
x-im-original-size | The size, in bytes, of the pristine image or video |
x-im-original-width | The width, in pixels, of the original image |
x-im-pixel-density | The pixel density of the derivative image |
x-im-result-width | The width, in pixels, of the derivative image |
Reported byte savings for mp4 video files with a status code of 206 (partial content) may be inaccurate. This is because the video is sent in chunks defined by the Range header of the request, which results in the video being optimized multiple times. However, this can be remedied by using Piez in combination with the Akamai Developer Toolkit.
Updated about 3 years ago