RANKNIBBLER

// FREE ON-PAGE SEO CHECKER

How to Optimise Images for SEO

Images are a crucial part of web content, but they can also be one of the biggest drags on page speed and SEO if not optimised properly. Image optimisation covers alt text, file names, dimensions, compression, format choice, and lazy loading.

1. Alt Text

Alt text (alternative text) describes the image for screen readers and search engines. It is also displayed when the image fails to load.

Bad Alt TextGood Alt Text
alt="" (empty)alt="Red Nike running shoe on trail path"
alt="image"alt="SEO score dashboard showing 92 out of 100"
alt="IMG_4521.jpg"alt="Chocolate cake with cream frosting on white plate"

Be specific and descriptive. Include the target keyword naturally if it fits. For decorative images (borders, spacers), use alt="" to skip them.

2. File Names

Name your image files descriptively before uploading. red-nike-running-shoe.jpg is better than IMG_4521.jpg. Use hyphens to separate words and keep names lowercase.

3. Image Dimensions

Always include width and height attributes on your <img> tags. Without them, the browser does not know how much space to reserve, causing Cumulative Layout Shift (CLS). Check with the image dimensions checker.

4. Lazy Loading

Add loading="lazy" to images that are below the fold. This defers loading until the user scrolls near them, improving initial page load speed. Do not lazy-load your hero image or logo — those should load immediately. Check with the lazy loading checker.

5. Image Compression

Large image files slow down your page. Compress images before uploading:

6. Image Format

FormatBest ForBrowser Support
WebPMost images (photos + graphics)All modern browsers
AVIFBest compression, newest formatMost modern browsers
JPEGPhotos (fallback)Universal
PNGGraphics with transparencyUniversal
SVGIcons and logosUniversal

Use WebP as your primary format with JPEG/PNG fallbacks for older browsers.

Check your images with a free RankNibbler audit — it checks alt text, lazy loading, and dimensions for every image on the page.

Check your site now: Run a free audit on the RankNibbler homepage to see how your page scores across 30+ SEO checks.

Last updated: March 2026