- 🇬🇧United Kingdom lesleyfernandes
I am closing all very old tickets that have not received comments for a long time. If someone still faces these issues or thinks they are relevant, please reopen it. Feel free to contribute with more info or a patch.
Despite the correct image is loaded according to media query, the image is styled with the wrong height. This results in a wrong width displayed although there is enough space in the containing div. I hope attached images are explicit enough. here is the html produced :
<picture>
<!--[if IE 9]><video style="display: none;"><![endif]-->
<source data-srcset="path_to_styles/560/path_to_image/img_a.jpg?itok=UIXGYG4j&timestamp=1590394515 1x" data-aspectratio="560/373" media="(min-width: 70em)" srcset="https://www.domain.com/sites/default/files/styles/560/path_to_image/img_a.jpg?itok=UIXGYG4j&timestamp=1590394515 1x">
<source data-srcset="path_to_styles/468/path_to_image/img_a.jpg?itok=NJqDVVsj&timestamp=1590394515 1x, path_to_styles/936/path_to_image/img_a.jpg?itok=NAPhOcMX&timestamp=1590394515 2x" data-aspectratio="936/624" media="(min-width: 26em)" srcset="path_to_styles/468/path_to_image/img_a.jpg?itok=NJqDVVsj&timestamp=1590394515 1x, path_to_styles/936/path_to_image/img_a.jpg?itok=NAPhOcMX&timestamp=1590394515 2x">
<source data-srcset="path_to_styles/360/path_to_image/img_a.jpg?itok=IH_fCVq_&timestamp=1590394515 1x, path_to_styles/720/path_to_image/img_a.jpg?itok=rS4Wr2TH&timestamp=1590394515 2x, path_to_styles/1440/path_to_image/img_a.jpg?itok=evda78YF&timestamp=1590394515 3x" data-aspectratio="1440/960" media="(min-width: 0px)" srcset="path_to_styles/360/path_to_image/img_a.jpg?itok=IH_fCVq_&timestamp=1590394515 1x, path_to_styles/720/path_to_image/img_a.jpg?itok=rS4Wr2TH&timestamp=1590394515 2x, path_to_styles/1440/path_to_image/img_a.jpg?itok=evda78YF&timestamp=1590394515 3x">
<!--[if IE 9]></video><![endif]-->
<!--[if lt IE 9]>
<img class="lazyload" data-aspectratio="" data-src="path_to_styles/1440/path_to_image/img_a.jpg?itok=evda78YF&timestamp=1590394515" alt="L'arc de Galère (Kamara)" title="" />
<![endif]-->
<!--[if !lt IE 9]><!-->
<img class=" lazyaspectratio lazyloaded" data-aspectratio="" data-srcset="path_to_styles/1440/path_to_image/img_a.jpg?itok=evda78YF&timestamp=1590394515 1440w" alt="L'arc de Galère (Kamara)" title="" style="height: 120px;" srcset="path_to_styles/1440/path_to_image/img_a.jpg?itok=evda78YF&timestamp=1590394515 1440w">
<!-- <![endif]-->
</picture>
The strange thing is that sometimes after resizing the window and reloading the page the "lazyaspectratio" class is not present in the html and when it happens the right image width is displayed.
- Desktop display:
720 image loaded
180x120 image displayed
359 div container width
375 page container & viewport width
- Mobile display:
560x373 image loaded
180.017x119.9 image displayed
567.717 div container width
1263 page container width
1280 viewport width
Closed: outdated
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I am closing all very old tickets that have not received comments for a long time. If someone still faces these issues or thinks they are relevant, please reopen it. Feel free to contribute with more info or a patch.