How to Fix Non-Descriptive Image File Names for SEO

This check flags pages that load images with meaningless file names such as IMG_0042.jpg, DSC_1187.JPG, Screenshot 2026-01-12.png or random hashes. By the end of this guide you will have found the affected images, renamed them to short, hyphenated names that describe what the image shows, updated every page that references them, and redirected the old image URLs.

By Updated ⏱ 30-60 minutes for a small site; longer for large product catalogs🎯 Beginner● Low impactOn-Page
Illustration: Descriptive image file names fix guide
ON-PAGE · FIX GUIDE Descriptive image file names IMPACTEFFORT TIME30-60 minutes for a small site; longer for large product catalogs LEVELBeginner

Why it matters

The file name is one of the few text signals search engines get about an image before they analyze the pixels, and it appears in the image URL that Google Images, Bing and AI answer engines index and sometimes show. A name like red-trail-running-shoe-side.jpg reinforces the page topic and alt text, while IMG_0042.jpg gives no context at all. The ranking effect is small, but the fix is cheap, makes your media library searchable for your own team, and avoids leaking details such as device names or screenshot dates.

✕Before<img src="/uploads/IMG_0042.JPG"alt=""> on /products/trail-runner✓After<imgsrc="/uploads/red-trail-running-shoe-side.jpg"alt="Red Example Co trail running

What you need

Access to your CMS media library or the folder where site images live
A crawler or browser DevTools to list image URLs per page
Access to server or CDN redirect rules (optional, for images already indexed or linked)
A list of the products, people or places your images show

Step-by-step fix

1

List the images with meaningless file names

Crawl the site (Screaming Frog: Bulk Export > Images > All Image Source URLs, or Sitebulb's Images report) and sort by file name. Look for camera and phone defaults, screenshot names, generic words and long hashes:

  • IMG_, DSC_, DSCN, PXL_, GOPR, Screenshot, Screen Shot, image1, photo, untitled, final-v2
  • Strings of 16+ random hex characters

For a quick check on a single page, paste the snippet into the DevTools Console.

javascript
[...document.images].map(i => i.currentSrc || i.src).filter(u => /^(img|dsc|dscn|pxl|gopr|screenshot|screen[-_ ]shot|image|photo|untitled)[-_ ]?\d*|[0-9a-f]{16,}/i.test(decodeURIComponent(u.split('/').pop().split('?')[0])))
Pro tip: Start with the templates that repeat across many pages (logo, header banners, product images) since one rename fixes many URLs at once.
2

Pick a naming convention

Use lowercase, words separated by hyphens (not underscores or spaces), 3-6 words describing what is actually in the image, and the correct extension. Put the most specific term first and add a variant such as color or angle when you have several shots of the same thing. Do not stuff keywords or repeat the brand on every file.

text
Bad:  IMG_0042.JPG, Screenshot 2026-01-12 at 10.14.33.png, a8f3c91e2b7d4f60.webp
Good: red-trail-running-shoe-side.jpg, example-co-checkout-settings.png, lisbon-office-team-2026.webp
Pro tip: Match the file name to the alt text in meaning, but keep the file name shorter.
3

Rename the files before uploading

Rename each original file on your computer with a description, then normalize case and separators in bulk. The loop below (macOS/Linux terminal, run inside the image folder) lowercases names and converts spaces and underscores to hyphens; it does not invent descriptions, so do the descriptive part by hand or with a spreadsheet of old-to-new names.

text
for f in *; do n=$(printf '%s' "$f" | tr '[:upper:]' '[:lower:]' | sed -E 's/[ _]+/-/g'); [ "$f" != "$n" ] && mv -n "$f" "$n"; done
Pro tip: Keep a two-column CSV (old_name,new_name). You will reuse it for find-and-replace and redirects.
4

Replace the images and update every reference

Upload the renamed files (or use your CMS's replace/rename feature, see platform notes) and update the src, srcset, Open Graph og:image and any CSS background-image URLs that pointed to the old names. Search your theme, page builder content and database for the old file names to catch hard-coded references. If your CMS generates resized copies, make sure those are regenerated with the new name too.

html
<!-- Before -->
<img src="/uploads/IMG_0042.JPG" srcset="/uploads/IMG_0042-800x800.JPG 800w" alt="">
<!-- After -->
<img src="/uploads/red-trail-running-shoe-side.jpg" srcset="/uploads/red-trail-running-shoe-side-800x800.jpg 800w" alt="Red Example Co trail running shoe, side view">
Pro tip: Fill in or fix the alt attribute while you are editing each image; it is a stronger signal than the file name.
5

Redirect old image URLs that are indexed or linked

If an old image appears in Google Images or is hotlinked from other sites, add a 301 redirect from the old URL to the new one so you keep that traffic and avoid broken images elsewhere. Images that were never indexed can simply be deleted after the swap.

nginx
# Nginx
location = /uploads/IMG_0042.JPG { return 301 /uploads/red-trail-running-shoe-side.jpg; }

# Apache (.htaccess)
Redirect 301 /uploads/IMG_0042.JPG /uploads/red-trail-running-shoe-side.jpg
Pro tip: Update your image sitemap (if you have one) so it lists only the new URLs.
6

Re-crawl and confirm the pages are clean

Purge your CDN and page cache, then re-run the crawl or rerun this audit. Confirm the flagged pages now load only descriptively named images, that no image returns 404, and that the old URLs return 301 to the new files.

text
curl -sI https://example.com/uploads/IMG_0042.JPG | grep -iE '^(HTTP|location)'
Pro tip: Add the naming rule to your content upload checklist so new uploads don't reintroduce camera-default names.

Platform-specific notes

WordPress

WordPress keeps the uploaded file name and cannot rename files in Media > Library by default; editing the Title field does not change the URL. Either re-upload a renamed file, or use a plugin such as Phoenix Media Rename or Enable Media Replace, which rename the file and its generated sizes. Then run a search-replace (WP-CLI: wp search-replace 'IMG_0042' 'red-trail-running-shoe-side' --dry-run first) to update post content. Note that large uploads get a -scaled suffix, which is fine.

Shopify

The CDN URL uses the name the file had at upload, plus a ?v= version query. Rename the file locally and re-upload it in Products > [product] > Media (or Content > Files), then delete the old image. Shopify handles CDN URLs itself, so you cannot add server redirects for old image paths; prioritize product and collection images.

Wix

Wix stores images under a media ID but appends the original file name to the end of the delivery URL (e.g. .../red-trail-running-shoe-side.jpg). Rename before uploading through Media Manager and swap the image in the editor; renaming inside Media Manager may not change URLs already placed on pages, so re-insert the image after renaming.

Webflow

Webflow prefixes asset URLs with an ID but keeps your file name after it. Re-upload the renamed file in the Assets panel and use Replace image on each element and CMS image field, then republish. The Assets panel also lets you set alt text globally per asset.

Next.js

Rename files in /public (or your image source bucket) and update imports or src props; next/image passes the original path in the url parameter, so the renamed path is what gets indexed. Add old-to-new pairs to redirects() in next.config.js with permanent: true for images that were indexed.

Check that it worked

✅ How to verify

  • Rerun this audit and confirm the number of pages flagged for non-descriptive image file names has dropped to zero or near zero.
  • Open a fixed page, right-click an image, choose Copy Image Address, and check the file name is hyphenated and descriptive.
  • Run curl -I on a few old image URLs and confirm a 301 with a Location header pointing to the new file, and a 200 on the new file.
  • In Google Search Console, use URL Inspection > Test Live URL on a fixed page and check the rendered HTML references the new image names.

⚠️ Common mistakes

  • Changing only the media Title or caption in the CMS and assuming the file URL changed; the URL stays IMG_0042.jpg until the file itself is renamed or replaced.
  • Renaming the file on the server without updating srcset, og:image or CSS references, leaving broken images on some screen sizes or in social shares.
  • Keyword-stuffing names like best-cheap-running-shoes-buy-running-shoes-sale.jpg instead of describing the image.
  • Using underscores or spaces (red_trail_shoe.jpg, red%20trail%20shoe.jpg); hyphens are the separator search engines reliably treat as word breaks.

Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.

Check my site free

FAQ

Do image file names actually affect SEO?

Yes, slightly. Google's image SEO documentation says file names can give clues about the image's subject. The effect is small compared with alt text and surrounding page content, but descriptive names help image search and cost little to do on new uploads.

Should I rename images that are already uploaded and ranking?

Prioritize images that are not getting image-search traffic and key templates like product photos. If an image already ranks or is linked externally, rename it only if you can add a 301 redirect from the old URL; otherwise leave it and fix new uploads going forward.

Hyphens or underscores in image file names?

Hyphens. Search engines treat hyphens as word separators, while underscores can join words together. Use lowercase letters and avoid spaces, which become %20 in URLs.

How long should an image file name be?

Aim for 3-6 words that describe what the image shows, typically under 60 characters. Add a differentiator such as color, angle or year when several images show the same subject.