adobe / adobe/aem-core-wcm-components

Obsolete parameter preferwebp=true added by NextGenDMImageURIBuilder causes loss of image compression

Open
#3,003 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
795
Forks
775
Avg merge
3d 22h
Merged PRs (30d)
8

Description

## Bug Report

1. The parameter preferwebp=true is no longer a valid Dynamic Media w/Open APIs parameter (Nov 2025)

2. Despite no longer being a valid API parameter, in some cases, it causes a loss of image compression (as far as we can tell in combination with width and dpr parameters. Example: https//delivery-...?width=448&preferwebp=true&dpr=2)

**Current Behavior**

Images with this parameter (in combination with others) are not compressed (to WebP or AVIF). When the parameter preferwebp=true is removed, the image is compressed again

**Expected behavior/code**

1. As the parameter is obsolete, it should not be generated by com.adobe.cq.wcm.core.components.internal.models.v3.NextGenDMImageURIBuilder

2. Images should always be compressed (given the right accept request header), no matter whether a query parameter preferwebp is provided or not

**Environment**

AEM CS: 2025.11.23385
Core Components version 2.30.2
Java JRE 11

**Possible Solution**

**Additional context / Screenshots**

Contributor guide

Open the contributing guide

Research direction

Start at com.adobe.cq.wcm.core.components.internal.models.v3.NextGenDMImageURIBuilder and trace where the preferwebp query parameter is generated. Check the builder’s existing tests or relevant test suite, then verify that the obsolete parameter is absent and image delivery still supports compression with width, dpr, and the appropriate Accept header.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.