sathya_prakasha
29-01-2021
Hi Team,
I am able to get the responsive image on my custom component by using responsive . It working for img tag.
https://experienceleague.adobe.com/docs/dynamic-media-developer-resources/image-serving-api/image-se...
But its not working for background-image:url div class. any suggestions?
<div class="hero__image" style="background-image:url('${dynamicmedia.fileReference @ context='styleString'}')"></div>
khamat_bn
30-01-2021
Hi @sathya_prakasha
as you are referring Dynamic Media Image so please try 'uri' instead of 'styleString' in context.
<div class="hero__image" style="background-image:url('${dynamicmedia.fileReference @ context='uri'}')"></div>