Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

dynamic media - aem

Avatar

Avatar
Validate 10
Level 3
sathya_prakasha
Level 3

Likes

22 likes

Total Posts

100 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
sathya_prakasha
Level 3

Likes

22 likes

Total Posts

100 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
sathya_prakasha
Level 3

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>

aem cloud

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Ignite 1
Level 3
khamat_bn
Level 3

Likes

31 likes

Total Posts

55 posts

Correct Reply

12 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Ignite 1
Level 3
khamat_bn
Level 3

Likes

31 likes

Total Posts

55 posts

Correct Reply

12 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile
khamat_bn
Level 3

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>

 

 

Answers (0)