3 ms·
As other replies have mentioned, you need to set the width and height attributes on the img element. I believe that now works for responsive images in recent ve
by tshaddox 6y ago
As other replies have mentioned, you need to set the width and height attributes on the img element. I believe that now works for responsive images in recent versions of popular browsers.
It used to not work for responsive images. We had to do tricks like pseudo elements with padding set to a percent value: https://css-tricks.com/preventing-content-reflow-from-lazy-loaded-images/ https://css-tricks.com/preventing-content-reflow-from-lazy-l...
- jaeh 6y agoits a bit flaky, sometimes it just does not work, and its hard to debug, css is a hard language to debug and get right. https://jaeh.at https://jaeh.at works fine when reloading, no layout changes, and the layout changed slightly before i fixed it using width & height. https://noncon.org https://noncon.org does not (and i had no time to fix, might be because width of images is not set, might be something with the css position/float layout, we had about a week to setup the whole conference infrastructure, including the streaming server, layout flashing was my last concern at the time and i kept myself too busy since then to fix something so trivial...) sorry for the personal links, just examples i knew from the top of my head because i built them ;)