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:
Looking for Guidance On:
Thanks in advance for any help!
Vijay
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi, @giuseppebag
Thanks for the reply! I actually found the solution in the Publishing pages with AEM Assets article.
Views
Replies
Total Likes
hi @VijayRa10, by looking at this page the image element should have the following fields:
The _dynamicUrl is the recommended URL to use for image asset delivery and should replace the use of _path, _authorUrl, and _publishUrl whenever possible.
Have you tried using the _dynamicUrl already?
Views
Replies
Total Likes
Hi, @giuseppebag
Thanks for the reply! I actually found the solution in the Publishing pages with AEM Assets article.
Views
Replies
Total Likes
Views
Likes
Replies