Dynamic Media Scene7 URL fields aren’t available in GraphQL responses in Experience Manager 6.5 LTS
In Adobe Experience Manager 6.5 LTS, the GraphQL ImageRef type doesn’t expose Dynamic Media Scene7 delivery URL fields such as _dynamicUrl or _dmS7Url. As a result, headless consumers receive the standard image reference fields but not a ready-to-use Scene7 URL. To fix this, read the Dynamic Media metadata, construct the Scene7 URL after the asset reaches PublishComplete, and expose the URL through your application layer or a custom Content Fragment field.
Description description
Environment
- Adobe Experience Manager (AEM) 6.5 LTS (all versions and Service Packs)
- Content Fragments delivered via the AEM GraphQL API
- Dynamic Media (Scene7 mode) enabled for assets
Issue/Symptoms
When you query Content Fragments through the AEM GraphQL API, the ImageRef type exposes standard image reference fields but doesn’t expose a Dynamic Media Scene7 delivery URL.
- The
ImageReftype exposes fields such as_path,_authorUrl,_publishUrl,mimeType,width, andheight. - The
ImageReftype doesn’t expose_dynamicUrlor_dmS7Url. - Dynamic Media URL fields documented for AEM as a Cloud Service aren’t available in the AEM 6.5 LTS GraphQL schema described in this article.
- Headless consumers don’t receive an optimized Scene7 image URL directly in the GraphQL response.
- Assets must be published to Dynamic Media before you construct and use a delivery URL.
Cause
The AEM 6.5 LTS GraphQL schema doesn’t expose Dynamic Media Scene7 delivery URL fields on the ImageRef type. The required URL must therefore be constructed from the Dynamic Media metadata and exposed through custom application logic or a custom Content Fragment field.
Resolution resolution
To expose Dynamic Media Scene7 URLs to headless consumers, follow these steps:
-
Confirm the GraphQL schema limitation by checking the
ImageReftype in the AEM GraphQL schema. Don’t query_dynamicUrlor_dmS7Urlas native fields in the AEM 6.5 LTS schema. -
Publish the assets to Dynamic Media Scene7 and verify that
dam:scene7Domain,dam:scene7File, anddam:scene7FileStatusare populated. -
Confirm that
dam:scene7FileStatusisPublishCompletebefore constructing or using the delivery URL. -
Construct the Scene7 delivery URL from the metadata.
- For image assets, combine
dam:scene7Domain,is/image/, anddam:scene7File. - For static assets such as PDF or video files, combine
dam:scene7Domain,is/content/, anddam:scene7File.
code language-none if (dam:scene7FileStatus == 'PublishComplete') { if (assetType == 'image') { url = dam:scene7Domain + 'is/image/' + dam:scene7File; } else { url = dam:scene7Domain + 'is/content/' + dam:scene7File; } } - For image assets, combine
-
Expose the constructed URL to headless consumers through a backend or middleware service, a custom API, or an application-layer field. If your architecture supports frontend construction, provide the metadata fields to the frontend and construct the URL there.
-
Optionally add a string field such as
dmScene7Urlto the Content Fragment Model and populate it with a workflow or event listener.- Note: This is a custom implementation and isn’t a native Dynamic Media URL field in the AEM 6.5 LTS GraphQL
ImageReftype.
- Note: This is a custom implementation and isn’t a native Dynamic Media URL field in the AEM 6.5 LTS GraphQL
-
Query the Content Fragment through GraphQL and verify that the required metadata fields or the constructed URL are present and correct.