I have this code (reduced minimum to reproduce):
<div style="overflow:hidden;height:160px;width:160px;border:4px solid red;position:relative;">
<img src="https://josefkorda.cz/img/sluzby-koncerty.jpg" loading="lazy" style="height:100%;position:absolute;top:0;left:-1px;">
</div>
Where the image (in red border) is natively lazy loaded with loading="lazy"
.
The issue is that the image is not loaded until I change some css
in DevTools
or delete the loading="lazy"
attribute in the code.
It starts to work if :
left:0
for image oroverflow:hidden
is deleted orloading="lazy"
is deleted
Here is the link for live example (UPDATE: by giving the dimensions to the images, the issue is no longer visible in example)
Here is the example image where the first circle with image is how it should look like and also how it works without loading="lazy"
. Next circles (images) are the problematic ones with loading="lazy"
attribute in an img
tag.