Image SEO Audit and Bulk AI Alt Text Generator (Colab Notebook)
Images are often the least audited part of a page: missing alt text, 2 MB PNGs, the same photo uploaded five times. This free Colab notebook gives your pages a full image SEO pass in one run, and it can draft alt text for the images that have none, using a computer vision model.
Who it’s for
Ecommerce and content SEOs with large image libraries, and anyone who needs to fix accessibility gaps across many pages at once.
How to use it
- Add your pages. One URL per line. Start with 5 to 20 important templates (home, category, product, article) rather than the whole site.
- Choose your options. Set the weight threshold, the alt text length flag, whether to classify images, and the alt text backend: a free open model in Colab, or the OpenAI or Gemini API with a key in Colab Secrets.
- Run the audit. It finds every image (including lazy-loaded and srcset images, picture sources, inline CSS backgrounds and og:image) and measures each one.
- Read the page summary and issues. Flags include missing or empty alt, filename-style or stuffed alt text, generic file names, missing width and height, a lazy-loaded first image, heavy files, legacy formats with no AVIF or WebP, no srcset, CSS images Google won’t index, and broken images.
- Check your image mix. CLIP zero-shot labels (product on white, lifestyle, screenshot, logo, infographic and your own labels) show what kinds of images you use.
- Review the alt text drafts for images with no alt attribute.
- Review near-duplicates: resized copies by perceptual hash, and visually near-identical images by CLIP similarity.
What you get
images.csv (one row per image with every measurement, the issues and the alt suggestion), pages.csv (counts per page) and duplicates.csv.
Costs and limits
- The default alt text model,
SmolVLM-500M-Instruct, and CLIP run free in Colab. The OpenAI and Gemini options are billed per image by the provider. - Alt text drafts are drafts. In testing, the small open model invented text on a dog’s vest and a breed that doesn’t exist, and a larger model still got a colour wrong. Neither could explain what a diagram was for. A human needs to check every one.
- CLIP similarity needs calibrating: two different photos of the same breed scored close to a resized copy. That’s why the notebook also uses a perceptual hash.
- Weight thresholds are audit conventions, not Google rules.
For the strategy behind every check, read Image SEO in 2026: The Complete Guide.
What’s included
- Finds every img, picture source, inline CSS background and og:image on your pages
- Checks real format, file size, pixel size, alt text, file names, width/height, srcset, lazy-loading and AVIF/WebP support
- Drafts alt text for images with no alt attribute using a free open vision model, or the OpenAI or Gemini API
- CLIP zero-shot labels show your image mix; pHash and CLIP similarity find near-duplicates
- Exports images.csv, pages.csv and duplicates.csv
Where this resource is used on MLforSEO
Walkthroughs on the blog
Concepts behind it
More video and visual resources
- Coding Script or NotebookYouTube Keyword and Tag Research Notebook (Autocomplete + Competitor Tags)
- ChecklistYouTube SEO Checklist: Improve Video Visibility and Channel Health (Checklist)
- Coding Script or NotebookImage Clustering by Color with Three Machine Learning Approaches for Visual Content Organization
- Content audits · No-Code TemplateContent Audit Template: Search Console, GA4 and Crawl to Keep, Update, Merge or Prune (Google Sheets)
- Content audits · ChecklistSEO Site Migration Checklist + Redirect Mapping Workbook
- Content audits · Coding Script or NotebookAI Crawler Access Checker: robots.txt, llms.txt and Bot Rules
See all 4 video and visual resources →See all 16 content audits resources →See all 42 coding script or notebook resources →
