AEM Dynamic Media: forcing PNG output when images are delivered as WebP
If images from Dynamic Media presets configured for PNG output are still delivered as WebP, add both fmt=png and bfc=off to the preset. Adding only bfc=off does not force PNG output.
Description description
Environment
Adobe Experience Manager Dynamic Media (all versions)
Symptoms
- Dynamic Media presets are configured to output images as PNG.
- When downloading or viewing images in a browser, the files are delivered as WebP instead of PNG.
- Adding only the
bfc=offparameter in the preset configuration does not resolve the issue; images continue to be served as WebP. - Adding
bfc=offdirectly to the image URL results in the image being delivered as PNG as expected.
Cause
Smart Imaging’s Browser Format Conversion (BFC) feature automatically delivers images in modern formats like WebP unless explicitly disabled. Adding only bfc=off disables browser format conversion, but does not force PNG output. The fmt=png modifier is also required to explicitly set the output format.
Resolution resolution
Try the steps below to resolve the issue.
-
Edit the affected Dynamic Media preset in the Scene7 configuration.
-
In the preset’s URL modifiers, add both
fmt=png(orfmt=png-alphaif transparency is required) andbfc=offto explicitly set the output format and disable browser format conversion:- For PNG:
fmt=png&bfc=off - For PNG with transparency:
fmt=png-alpha&bfc=off
- For PNG:
-
Save and publish the updated preset.
-
Clear the CDN cache or allow time for the cache to expire before retesting the download.
-
To verify, download or view an image using the updated preset and check the
Content-Typeheader in the HTTP response; it should beimage/png. -
Ensure that no additional
fmtorbfcparameters are appended to the final image URL, as these could override the preset values.