3 ms·
How/Why would I do this with responsive/fluid layouts and dynamically changing image sizes? You don't. You're not required to use it on every image. It's a c
by reaperducer 7y ago
How/Why would I do this with responsive/fluid layouts and dynamically changing image sizes?
You don't.
You're not required to use it on every image. It's a completely optional parameter that you add to individual images that might benefit from it.
You can use it on navigation icons that don't change size. Maybe in some of your boilerplate in the footer. Or in some sidebar content or a testimonial that you control. But if you have images of unknown size populating the middle of the page, don't use it on those.
- martin_a 7y agoBut isn't that exactly the use case of lazy loading and also the source of all those problems? The 1.2 kB icon in the footer is not really a problem, but the xxx kB article image some author uploaded with unknown sizes. Those things will make my page jump around and will need to be lazy-loaded.
- WorldMaker 7y agoIt should be possible in most backends to get size information from the image at the time of uploading. A pair of integers shouldn't be a lot of data to store as metadata for your HTML rendering process.