Skip to content

Add Next Gen Dynamic Media (NGDM) support to the StaticImage component - #1965

Open
pankaj-parashar wants to merge 2 commits into
masterfrom
feature/dynamic-media-support
Open

Add Next Gen Dynamic Media (NGDM) support to the StaticImage component#1965
pankaj-parashar wants to merge 2 commits into
masterfrom
feature/dynamic-media-support

Conversation

@pankaj-parashar

Copy link
Copy Markdown
Contributor

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.

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

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>
@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

1 similar comment
@adobe-bot

Copy link
Copy Markdown

Accessibility Violations Found

Id Impact
aria-required-attr critical
empty-heading minor
label-title-only serious
target-size serious

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...nents/internal/models/v1/form/StaticImageImpl.java 83.33% 0 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

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;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is 640 default and jpg default ?

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants