A good image explains a point better than a paragraph. With a few precautions, it is also understood by search engines and by people who use screen readers.
Alt text
The alt attribute describes the image in words. It serves those who cannot see it, shows when it fails to load and helps Google understand the content.
- Describe what appears and the image's role in the text, briefly.
- Do not stuff in keywords.
- Purely decorative images may have an empty alt (
alt="").
File name
Prefer chart-visits-per-month.webp to IMG_4021.webp. Use lowercase letters and hyphens between words.
Format and weight
- Use WebP or AVIF when possible, and JPEG for photos if you need compatibility.
- Resize to the size at which the image is displayed, without sending a 4000-pixel photo to fill 600.
- Compress, keeping acceptable quality.
Loading
Set width and height to avoid layout shifts and use loading="lazy" on images below the first screen. The main image at the top should not be lazy. Read more in Core Web Vitals.
Surrounding context
Place the image near the passage it illustrates and, when useful, add a caption. The nearby text also helps explain what it is about.
Third-party images
Use only images that are yours, licensed or free to use, and give the credit required. This protects you and the partner who publishes the article.
Structured data
Provide the main image in the article's markup (see the Schema guide).