Speed and performance

Image optimisation — quality, size and accessibility

Image optimisation delivers appropriate visual quality with efficient file sizes, dimensions and loading behaviour. It also includes useful alternative text and stable layout.

Published: Updated: 3 min read
Diagram: Image optimization. Meaning - Delivery - Description.

What does image optimization involve?

Image optimisation delivers appropriate visual quality with efficient file sizes, dimensions and loading behaviour. It also includes useful alternative text and stable layout. Choosing WebP or AVIF is only one part of the process. An oversized modern-format image can still waste bandwidth, while a tiny unreadable diagram fails the reader even if it loads quickly.

Selection of dimensions and format

Start with the role: product photo with enlargement, logo and article illustration have different requirements. Provide responsive variants so that the phone doesn't take up desktop size unnecessarily. Simple graphics may be suitable for vector, photographs for raster. Evaluate fine text, transparency and color at the actual size of your presentation.

Example of a header photo

A full width image can use srcset and sizes to make the browser choose the correct variant. Proportion reservation limits shifts. If it is the main content visible immediately, delaying lazy loading can worsen LCP. Content well below the initial view can often be downloaded later as long as proper scrolling is maintained.

How to write alt?

Describe the information needed in the context of the page. A product photo may require a version or perspective, and decoration may require an empty attribute. Do not fill the alt with a list of keywords and do not duplicate it without a signature. A complex chart may need additional text explanation so that its conclusion remains accessible without viewing the graphic.

Most common mistakes

Uploading camera originals and shrinking them with CSS only does not reduce the downloaded file. Repeated compression destroys quality. The lack of dimensions causes the system to move. Lazy loading of all illustrations may delay the most important one. A long file name with phrases will not replace a useful image, correct variants and a clear description.

How to check the result?

See the actual selected resource, its transfer and display size on the phone and computer. Check the text alternative after hiding the image. Compare LCP and stability on a slower network. Make sure the product details still help you make your decision. Good optimization speeds up and clarifies, rather than removing important visual evidence.

How to choose an illustration for an article?

Choose an image that helps you understand a topic, process or difference, rather than adding a random image just for the sake of the file's presence. Stock material requires a proper license and should not pretend to be a band or company. For the diagram, remove unnecessary repetition of the title if it is directly above it. The information needed for interpretation should also be included in the readable text, and not only within small graphics.

Alt describes the function or meaning of an image in context. Do not enter a list of phrases or a file name into it. A decoration may need an empty alt, while a link in an image needs a clear target. Match the dimensions and format to the content: SVG is suitable for simple diagrams, and photos require appropriate raster compression. Check the source selected on your phone and the behavior after resizing the window.

Sources and further reading

Use the primary documentation to check the principles and limitations described in this article.

How we prepare the glossary

These articles combine original editorial work, AI support for editing and translation, and checks against linked primary documentation. Examples are illustrative unless stated otherwise; they do not represent client results. Dates refer to publication and actual content changes.

From knowledge to action

Need help putting this into practice?

Tell us about your website or process. We will define the scope and the next practical step.

Discuss your project