FORMS-26424-Add Next Gen Dynamic Media (NGDM) support to the StaticImage component - #1965
Open
pankaj-parashar wants to merge 3 commits into
Open
FORMS-26424-Add Next Gen Dynamic Media (NGDM) support to the StaticImage component#1965pankaj-parashar wants to merge 3 commits into
pankaj-parashar wants to merge 3 commits into
Conversation
Ports the NGDM asset support from adobe/aem-core-wcm-components#2481 to the Adaptive Forms StaticImage (form/image v1) component. When the fileReference is an NGDM asset (/urn:...) and the NextGenDynamicMediaConfig OSGi service is enabled, the delivery URL is built directly instead of resolving a DAM rendition. Bumps aem-sdk-api to 2023.9.13665 to pick up the NextGenDynamicMediaConfig API, and enables the NGDM asset picker on the component's file upload dialog field. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Accessibility Violations Found
|
1 similar comment
Accessibility Violations Found
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
rismehta
reviewed
Aug 25, 2026
rismehta
reviewed
Aug 25, 2026
| private static final String PATH_PLACEHOLDER_SEO_NAME = "{seo-name}"; | ||
| private static final String PATH_PLACEHOLDER_FORMAT = "{format}"; | ||
| private static final String DEFAULT_NGDM_ASSET_EXTENSION = "jpg"; | ||
| private static final int DEFAULT_NGDM_ASSET_WIDTH = 640; |
Collaborator
There was a problem hiding this comment.
why is 640 default and jpg default ?
There was a problem hiding this comment.
Hi @rismehta ,
If we do not send any width the Dynamic Media Open API sends the default width of 1024, which dominates the screen and this is how it looks:

But with width default value = 640 , the image renders at a size that coexists properly with the rest of the form's components.

Since the authoring canvas has no independent scaling constraint, the size of the image canbe managed by theme and styling, We can keep this default to 640
rismehta
reviewed
Aug 25, 2026
- Extract Next Gen Dynamic Media (NGDM) URL-resolution logic out of StaticImageImpl into a shared NgdmImageUtils class - Add a Sling Model JSON-exporter test proving the resolved NGDM delivery URL is exposed as "value" and fd:repoPath is correctly absent - Fix multi-dot seo-name filenames (e.g. "product.hero.png") resolving to the wrong delivery URL/extension by splitting on the last dot, not the first - Tighten isNgdmImageReference() to require a non-empty asset-id and seo-name segment, avoiding a NoSuchElementException on malformed references - Mark com.adobe.cq.ui.wcm.commons.config as an optional OSGi import so the bundle still resolves on installations without this Cloud Service API
- Add FT_NGDM_IMAGE_PICKER (FT_FORMS-26424) constant, following the existing FeatureToggleConstants pattern - Split the Image dialog's file widget into two mutually-exclusive variants gated by granite:rendercondition/featuretoggle: NGDM picker enabled shows the Pick (Local/Remote) UI, disabled shows the original Browse Assets/Upload UI - Gate StaticImageImpl's NGDM URL resolution and fd:repoPath exclusion behind the same toggle via ComponentUtils.isToggleEnabled(), so a saved NGDM reference is treated as a plain fileReference when the toggle is off - Add toggle-enabled/disabled test coverage, following the same System.setProperty/@AfterEach pattern already used in FragmentImplTest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the NGDM asset support from adobe/aem-core-wcm-components#2481 to the Adaptive Forms StaticImage (form/image v1) component. When the fileReference is an NGDM asset (/urn:...) and the NextGenDynamicMediaConfig OSGi service is enabled, the delivery URL is built directly instead of resolving a DAM rendition. Bumps aem-sdk-api to 2023.9.13665 to pick up the NextGenDynamicMediaConfig API, and enables the NGDM asset picker on the component's file upload dialog field.
changes behind : FT_FORMS-26424
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: