Reputation: 151
we have different renditions of image created in dam by Dam Workflow in our project. Now when we want to access an image in page how will we know which rendition to access dynamically depending on the device. Is it something which UI decides or is it something AEM decides. And how does it work with dispatcher.
Any help is highly appreciated. Thanks, Tushar
Upvotes: 2
Views: 3193
Reputation: 9402
You can build logic into your components so that they will fetch the correct image, so the UI decides which image rendition to fetch. You can use something like the picture element or something like the picturefill polyfill to do this. These elements allow you to define the screen resolution min and max and
"the browser will only download the image explicitly stated for the matching scenario."
You can build the different "srcset" attributes to reference your different rendition URLs. Since each rendition has a different url, each will get dispatcher cached separately.
Also check out image presets.
Upvotes: 1