4 ms·
> The only annoying part is still that the image dimensions are not reserved appropriately, even with present width and height attributes. So the layout can jum
by davidmurdoch 6y ago
> The only annoying part is still that the image dimensions are not reserved appropriately, even with present width and height attributes. So the layout can jump around if you scroll past the not yet loaded image. If you have an idea how to deal with that within picture groups, I love to hear about it.
See https://www.andyshora.com/css-image-container-padding-hack.html https://www.andyshora.com/css-image-container-padding-hack.h...
I used the trick on https://jessicakhope.com's https://jessicakhope.com's blog-post pages. View the source on https://jessicakhope.com/blog/family-workcation-in-portland-oregon/ https://jessicakhope.com/blog/family-workcation-in-portland-..., for examples.
The site is static and is generated by hugo. The image container paddings are generated at compile time.
- asaaki 6y agoThank you for the tip/link. Seems to be an appropriate solution, just have to fiddle with my build process for a bit.