Images help a page in search in two ways: they can appear in image results and bring visitors directly, and they affect how fast and stable the page feels, which search engines measure. Both come down to a handful of habits. Here is a checklist, with measured numbers where size matters.
1. Name the file for what it shows
A file called IMG_4021.jpg tells a search engine nothing; red-ceramic-coffee-mug.jpg describes the picture. Use a few words, lower case, separated by hyphens, which Google recommends over underscores. Name the file before you upload it, because many content systems turn the file name into the image's address.
2. Write alt text for a person who cannot see the image
Alt text is read aloud by screen readers and shown if the image fails to load, and search engines use it to understand the picture. Describe what matters in this context in a short sentence: "Red ceramic coffee mug with a chipped handle" rather than "mug" or a list of keywords. Purely decorative images should have empty alt text (alt="") so screen readers skip them.
3. Make the file small
Large images are the most common reason a page loads slowly. In our tests, resizing a 3000 × 2000 photo to 1280 pixels wide took it from 990 KB to 90 KB at a normal quality setting, and in our format tests a photo saved as WebP was half the size of the same photo as JPG, at the settings our converters use. Our guide to reducing image file size has the full numbers; Compress Image does the resizing and compression in your browser.
4. Pick the format by content
- Photos: WebP, or JPG.
- Screenshots, diagrams, graphics with text: PNG, or lossless WebP.
- Logos and icons: SVG where possible.
Our image formats guide compares them on the same images.
5. Set width and height
Give every image its width and height attributes (or a CSS aspect ratio). The browser then reserves the space before the image arrives, so text does not jump down as images load. That jump is measured as Cumulative Layout Shift, one of Google's Core Web Vitals.
6. Load images below the fold lazily
Add loading="lazy" to images further down the page so they load only when the reader scrolls near them. Do not lazy-load the main image at the top, which is often the largest element on the page; loading it late delays Largest Contentful Paint, another Core Web Vital.
7. Serve the right size to each screen
A phone does not need a 2000-pixel image. The srcset and sizes attributes let the browser pick the smallest file that looks sharp on that screen. If your site builder creates these automatically, upload one large, good-quality original and let it do the work.
8. Put images near the text they illustrate
Search engines use the surrounding text, headings and captions to understand an image. An image placed next to the paragraph it explains, with a caption where useful, is easier to understand than one in a gallery far from any words.
Check your images
Our Image SEO Checker scores an image on file size, format, dimensions, file name and alt text, suggests a better file name, and runs in your browser. Image Optimization Analyzer checks size, format and dimensions the same way, also in your browser.
