A presentation at Stockholm Web Performance Group in in Stockholm, Sweden by José M. Pérez
This talk builds on top of a previous one at the Stockholm Web Performance Group meetup that explained the picture element and some image optimization tools. However, I felt that in real applications it is sometimes to put into practice, and sometimes we want to have more control on the process of requesting and loading images.
The most performant request is the one that is never done, and this beats any possible image optimization. There are some common scenarios in which we can avoid using images, being adopting a minimalism/flat design or hiding certain images on smaller screens.
Of course, we will need to use some images eventually. For these cases I explain how the picture element might help and some of its limitations I have found when working with real websites. One of them is lazy loading of images, which can bring great savings in terms of data traffic, but it is also easy to implement wrongly.
Lastly I show some techniques to "fill" the space for an image while it is loaded, going from just showing an empty area to doing a progressive loading from a blurry image.
The talk contains some videos and animations, so I recommend checking it out directly on https://jmperezperez.com/sthml-wp.