Control image format delivery in Edge Delivery Services
To control whether Adobe Experience Manager Edge Delivery Services delivers images in WebP or JPEG format, use the format URL parameter and adjust the picture element markup in your block or template. Keep both WebP and JPEG sources unless you must enforce a single format.
Description description
Environment
Adobe Experience Manager (AEM) Edge Delivery Services (all versions)
Symptoms
You may need to control whether images delivered via Edge Delivery Services (EDS) are rendered in WebP or JPEG format. By default, EDS optimizes images for the requesting browser, but certain use cases require enforcing a specific format for compatibility or integration reasons.
-
By default, EDS generates a
pictureelement with multiple sources:- WebP for browsers that support it
- JPEG as a fallback for older browsers
-
The actual format delivered depends on browser support and the image URL parameters or markup configuration.
-
You may need to:
- Allow both WebP and JPEG (default, recommended)
- Force JPEG only (for tools or integrations that do not support WebP)
- Force WebP only (not recommended, as it breaks compatibility with browsers lacking WebP support)
EDS does not generate specific error messages. The issue is about configuration and delivery behavior.
Cause
EDS optimizes image delivery based on browser capabilities and markup configuration. The delivered format is determined by the combination of URL parameters and the structure of the picture element in your templates or blocks.
Resolution resolution
Follow these steps to resolve the issue.
-
Review the default EDS behavior. EDS automatically generates
pictureelements with both WebP and JPEG sources. Modern browsers use WebP. Others fall back to JPEG. For more information, see the EDS Media Documentation. -
To control the image format, use the
formatparameter in EDS image URLs:- Use
format=webpfor WebP. - Use
format=jpegorformat=jpgfor JPEG. - The delivered format depends on both the URL parameter and the
picturemarkup generated by your block or template.
- Use
-
To allow both WebP and JPEG (recommended default), use a
pictureelement with both WebP and JPEG sources. Browsers supporting WebP use the first source. Others use JPEG. -
To force JPEG only, use image URLs with
format=jpeg(orformat=jpg) and remove WebPsourceelements from thepictureelement in your custom block or template. Implement this in your EDS block JavaScript or template logic as needed. -
To force WebP only (not recommended), emit only WebP
sourceelements.Note: This approach is discouraged as it breaks image display in browsers that do not support WebP.
-
As a recommended practice, upload JPEG or PNG as source images in AEM Assets and let EDS (and/or Dynamic Media) generate WebP automatically at delivery. Keep both WebP and JPEG variants in your
pictureelements unless you have a strong technical requirement to enforce JPEG only.
After making these changes, verify that images are delivered in the desired format by inspecting the rendered HTML and image requests in your browser.