You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a large image, such as a hero image taking the width of the design, you should specify sizes so that smaller versions are requested on smaller devices. E.g. if you have a 1280px image you may want to specify something like:
Describe the bug
According to the documentation:
If you have a large image, such as a hero image taking the width of the design, you should specify sizes so that smaller versions are requested on smaller devices. E.g. if you have a 1280px image you may want to specify something like:
<enhanced:img src="./image.png" sizes="min(1280px, 100vw)"/>
If sizes is specified,
<enhanced:img>
will generate small images for smaller devices and populate the srcset attribute.This doesn't appear to work when the image is loaded dynamically:
Reproduction
Create a component (trimmed):
From a page:
Result:
Logs
System Info
Severity
annoyance
Additional Information
I hope this is how it is intended to be used, the docs seem to say so, but I'm quite a beginner at this.
The text was updated successfully, but these errors were encountered: