It is crucial that your images load quickly and efficiently. Image optimization can be a tough topic to wrap your head around, but it’s well worth the effort. When it comes to images, there are three key things to keep in mind:
- Images are the largest part of the page and therefore have the highest loading time impact on performance.
- Poorly optimized images can contribute to a performance risk or even a security risk (for example, if an image is broken).
- Smartly-optimized images will give users a better experience across devices and browsers by providing faster page loads and fewer interruptions in their browsing experience.
If you are looking for a way to resize images automatically for different viewport sizes, the Webien Image Optimizer is perfect for you. We will be using an image handler script that runs after the window loads because we need actual viewport dimensions to know what image size to use.