How to access DAM image from /content/dam path returned in AEM GraphQL response?
I'm building a block using EDS with XWalk, and I'm fetching content fragments via GraphQL in AEM as a Cloud Service. The image field in the response returns a DAM path like:
"image": {
"_path": "/content/dam/shared/en/contributor/ian_provo.jpg"
}
In my JavaScript, I'm using a helper (createOptimizedPicture) to render the image in a <picture> tag, which generates URLs like:
<img src="/content/dam/shared/en/contributor/ian_provo.jpg?width=750&format=jpg&optimize=medium">
The problem is: The base path /content/dam/... works fine, but adding query parameters like ?width=750&format=jpg causes a 404 error.
What I’ve Verified:
- The image is published and accessible in DAM.
- The GraphQL response includes the correct _path.
- There don’t appear to be any permission issues.

Looking for Guidance On:
- What’s the correct way to reference and optimize DAM images returned from a GraphQL query?
- Why do image URLs with query parameters like ?width=750&format=jpg result in 404 errors?
- Is there any specific configuration needed in AEM (or CDN) to support these optimized image requests?
Thanks in advance for any help!
Vijay