Images play an important role in the visual appearance of modern websites and in shaping the user experience. However, poorly optimised images can cause slow loading and excessive traffic, which can degrade website performance and negatively impact search engine optimisation. Below, I will explain why images need to be optimised for websites and what solutions I use when creating websites.
Reduce image size
Large images slow down the loading of web pages, especially on mobile devices where data traffic can be limited. It is therefore important to reduce image size to use less data traffic and increase loading speed
Format: The choice of image format is an important consideration. JPEG is ideal for photos, while PNG is recommended for graphics that require a transparent background. However, the more modern WebP and AVIF formats offer a much smaller file size with the same quality, so in many cases it is worth choosing these, as they offer excellent compression while maintaining quality. For example, the WebP format provides up to 25-30% smaller file size than PNG or JPEG.
Resolution: Care must be taken to ensure that the resolution of the image matches the display. Images that are too large will slow down the website, while images that are too small may appear pixelated. It is advisable to crop images to the size appropriate for the placement and use the appropriate resolution.
Image compression: It is important to find the right compression level to preserve the quality of the image but keep the file size as small as possible. Excessive compression can result in a blurry or pixelated image, while low compression can result in a file size that is too large. Testing and fine-tuning can be done to get the image to look the way you want.
Search engine optimisation of images
SEO optimisation of images can help make your website easier to find for search engines, especially for image-based searches. Proper optimisation of images supports better rankings in Google and other search engine results in a number of ways.
Since search engines do not "see" the content of images, it is important to provide the correct filename, title and description. Alternative text (alt text) is particularly important, as it not only makes the image meaningful to search engines, but also helps visually impaired users to understand the content of the images. It is also helpful to use keywords in your image captions. This can improve indexing, especially for image-based searches.
Other tricks
In addition to the above aspects, there are other methods that can further optimise the images on the website and the performance of the page.
Caching allows returning visitors' browsers to avoid reloading images, improving loading speeds for them. And "lazy loading" is a technique whereby images only load when the user scrolls to the image on the page. This can significantly reduce the time it takes for a page to load for the first time, especially for image-rich pages (such as galleries).
