Skip to main content
Guides

How to Name Image Files for SEO: 7 Rules and Examples

Karan Singh BhakuniUpdated 2 Nov 2026
  • 15 min read
  • 9 sections
  • 1 comparison table
  • 8 questions answered

The short answer

To name image files for SEO, describe what the picture shows in a few lowercase words joined by hyphens, use the extension for the actual format, and choose the name before upload. Three to five words is a useful starting pattern, not a Google rule. Check the published image URL afterwards: a builder may preserve, alter or replace your local filename.

Want the site rather than the reading? Build one free with Grigora

Contents9 sections

Google describes a filename as a very light clue about the image’s subject. Descriptive naming is sensible preparation, but it is not a promise of better rankings. For an existing image, changing the public URL introduces extra work. The free image filename SEO checker can check the form of a name; it cannot see what the picture shows.

How to name image files for SEO: Grigora guide cover of a man carrying a framed photo and holding up a blank label tag, with a magnifying glass

Read nextIs a Blog Informal or Formal? Examples and Tone Guide

What Google actually says about image file names

Google’s current image SEO guidance recommends concise, descriptive filenames rather than generic camera codes. Its example prefers my-new-black-kitten.jpg to IMG00023.JPG. It also suggests automation for large image collections and translated filenames for localized images. Use an extension that matches the actual image format.

That guidance sets no filename word-count target or character limit. It also considers the image itself, alt text and relevant surrounding content. A tidy filename does not compensate for an unrelated picture or an inaccessible page.

Name new files while preparing them. For an established image, first ask whether changing its URL solves a real problem. Rewriting the surrounding page does not, by itself, require renaming the image.

Put Google's advice together and one good name looks like this, with what WordPress does to a careless one underneath.

A useful new filename, oak-dining-table-front.jpg, identifies the subject and view with hyphens. The extension must match the actual JPEG format; renaming is not conversion. No fixed word count is required, and the platform may alter the published URL.
Subject, useful view, hyphens and the real file format. The platform may add its own URL components.

Seven rules for naming an image file

All seven happen before you upload.

  1. Describe the picture, not the page. Spend the name on what the image shows: oak-dining-table-front.jpg, not dining-furniture-guide-image-2.jpg.
  2. Prefer hyphens between words. Google recommends hyphens rather than underscores for readable URL word boundaries. A space in a URL path is normally represented as %20; a literal + in a path is not generally the same as a space. Existing encoded names are not automatically broken.
  3. Lowercase, the whole thing. The same page says Google "treats both /APPLE and /apple as distinct URLs with their own content". Mixed case also breaks links: on a server that is strict about case, a link to oak-table.jpg will not find Oak-Table.jpg.
  4. Keep it concise, with enough detail. Three to five words is a useful habit, not a minimum or maximum. logo.svg may be clear in context; a specific event or product variant may need more words. Google sets no 50- or 60-character filename ranking threshold.
  5. Match the extension to the real format. Export or convert the pixels when changing formats. Renaming photo.heic to photo.jpg does not create a JPEG. A mismatched suffix can confuse tools even when a browser happens to decode the file.
  6. Avoid collisions where you upload. Descriptive, distinct names help manage similar files. Shopify may add an identifier when a name already exists in the store. Identical basenames in different directories are not inherently an SEO error: the full URLs differ.
  7. Remove irrelevant camera codes and editing clutter. Keep a date, SKU, sequence or version when it identifies the subject or serves a real publishing/cache purpose. Avoid -final-final-copy as a substitute for a description.

Here are six possible names for an oak-table photograph. Prefer the descriptive option for a new upload. A short generic name, underscore or old camera code is an improvement candidate, not proof that an existing image cannot rank. A sales pitch makes the name harder to scan; do not infer a filename-specific spam penalty from Google’s separate warning about stuffed alt text.

Six filenames for a table photograph, from generic camera code and editing clutter to a concise descriptive name. Hyphens are preferred for new names; an existing generic or underscore name is not automatic evidence that its public URL needs changing.
Use a descriptive pattern for new uploads. Do not rename a useful live image just to satisfy a checklist.

Good and bad image file names, side by side

These are common incoming names and possible URL forms when the platform preserves the basename. Actual upload systems may sanitize or replace them. Format conversion and file renaming are different operations: convert a HEIC photo to a supported web format before choosing its new name.

The name it arrives withHow that name is servedA name that works
Phone photo of a product: IMG_4471.HEICIMG_4471.HEIC; HEIC is not among Google’s listed web image formats. Convert the image; changing its suffix is insufficient.After JPEG export: oak-dining-table-front.jpg
Design tool export: Frame 2147239390.jpgFrame%202147239390.jpgpricing-table-three-plans.jpg
Camera headshot: DSC_0042.JPGDSC_0042.JPG, capitals preservedpriya-nair-head-chef.jpg
Stock download: download (7).jpegFor example download%20%287%29.jpeg; encoding and sanitization vary by systembrushed-steel-kettle-side.jpg

How to name image files for SEO in four steps

The order matters: two of these steps hand the file back with a name you did not pick.

  1. Resize and compress first. Prepare suitable pixel dimensions and file weight. The free image size compressor accepts a JPEG, PNG or WebP up to 10MB. Check the result’s actual output format before naming it.
  2. Convert, if you are converting. The image to WebP converter turns a JPEG or PNG into WebP. Do it before the rename, not after.
  3. Rename on save. Both tools save the result under a fixed name of their own, whatever you uploaded: the converter's is image_to_webp_converter_by_grigora.webp and the compressor's is image_size_compressor_by_grigora.jpg. Then check the new name with the image filename SEO checker.
  4. Upload, check the served URL and choose the text alternative. For a meaningful image, describe what it contributes in this page’s context. The alt text generator can draft a description, but you must check its accuracy. Its 125-character target is a tool heuristic, not a universal HTML or accessibility limit. Decorative or redundant images can need alt="" instead.
Four steps: prepare the actual image format and dimensions, name the final downloaded file, publish and inspect the served URL, then choose an appropriate description or empty alt attribute for its purpose. A tool score or 125-character target is not a search-engine requirement.
Choose the name after export, then check what the platform publishes. Text alternatives depend on the image’s purpose.

The filename checker is a string-based checklist. The existing capture below shows my-awesome-photo.jpg at 97/100, with three words, 16 characters before the extension and a subject-first warning. That score is not a Google score or evidence that the words fit the picture. Its rules deduct 10 points per issue and 3 per warning, including formatting, generic names and length checks. It never sees the image’s pixels and cannot verify the true file format. An AVIF-extension warning reflects the tool’s narrower allow-list; Google does support AVIF.

Grigora's free Image Filename SEO Checker result for my-awesome-photo.jpg: 3 words, 16 characters, a score of 97 out of 100 marked Pass, and one warning that the main subject should be placed first in the filename.
The Image Filename SEO Checker passes my-awesome-photo.jpg at 97 out of 100, but still flags that the subject should come first.

Naming hundreds of product photos without losing a day

Google suggests automating the naming once you have thousands of images. A pattern that scales is product-variant-view, so that within one product only the view changes: oak-dining-table-front.jpg, then -detail, then -in-room.

Batch rename before import using Finder or another bulk renamer, with a preview and a mapping from old names to new names. Distinguish related views within the platform’s upload namespace; do not overwrite a different product’s image. Whether the catalogue lands in Grigora Commerce or elsewhere, the copy beside each photo still matters; see how long a product description should be.

What your website builder does to the file name after you upload it

The six-platform diagram below preserves examples recorded in this article’s source on 23 September 2026. They illustrate possible URL shapes, not a fresh test of every platform or a guarantee for every upload. Compare your own published src or selected currentSrc with the name you uploaded.

  • WordPress core sanitizes filenames: it replaces whitespace runs with dashes and removes certain punctuation, while normally preserving the basename’s capitals. Filters can change that behavior. Its large-image processing uses a default 2560px threshold and can add -scaled when scaling succeeds. That threshold can be changed or disabled; it is not an unconditional rule for every uploaded image.
  • Shopify can preserve a basename and add URL parameters. Its current file guidance says a duplicate name or conflicting formatting can cause an added identifier. It recommends a distinct name and avoiding an underscore immediately before image dimensions, for example product-image-5x4.jpeg.
  • Squarespace’s recorded example keeps the descriptive basename after a site ID and an upload ID, with image-size parameters available on delivered URLs.
  • Wix’s recorded example uses an asset identifier and resize instructions before an encoded filename at the end of the URL. That shows why editing your local filename is not complete control over a delivered URL.
  • Webflow’s recorded example prefixes the chosen basename with an asset ID. Do not infer that every asset URL or future upload must follow that exact pattern.
  • This blog’s Next.js image route puts the encoded source path in a url parameter alongside requested width and quality. A source filename can therefore appear inside a query rather than at the end of the delivered URL.

The practical check is the same: inspect the published URL rather than assuming your desktop name survived. If you use a third-party image, follow its licence and hosting terms before downloading or rehosting it; choosing a filename is not permission to make a new copy.

Six historical URL examples recorded in the article source on 23 September 2026: WordPress upload folders, a Shopify basename with a version query, Squarespace site/upload IDs, a Wix identifier and resize path, a Webflow ID-prefixed basename, and a Next.js encoded source-path parameter. These examples illustrate possible platform-added URL components, not every current upload.
Recorded URL examples from 23 September 2026. They show possible patterns; inspect your own published image rather than treating them as universal upload rules.

Also worth readingDo I Need to Trademark My Blog Name? US Guide

Should you rename images that are already on your site?

Usually not. Use good names for every new upload, but renaming the old ones tends to cost more than it returns.

Changing a public image URL means updating the places that reference it and giving crawlers a connection from the old URL to the new one. The current Google image guidance recommends consistently reusing the same URL for an image referenced across pages. Keep a stable URL when there is no worthwhile reason to change it; no fixed reprocessing period applies to every site.

Three cases where it is worth doing:

  • The existing filename is materially wrong or exposes information that should not be public. If sensitive information was already published, changing a URL alone does not erase external copies.
  • A migration or asset reorganization already requires a new image URL. Preserve existing URLs where practical; improve names as part of the mapping when they must change.
  • You are deliberately replacing an image and have checked the references, redirect support and reason for using a new URL. A text-only page rewrite is not enough reason by itself.

When an image URL must change, map each old URL to its replacement, use a permanent server redirect where supported, and update every reference: src, responsive candidates, CSS, social metadata and image sitemaps. Test that the old URL reaches the intended replacement and that the new file loads. Redirects help communicate the move; they do not promise unchanged visibility.

Shopify is the awkward case. Renaming a file there means editing its URL Handle, and its documentation says "the previous URL for that file no longer works". It mentions no redirect for the old address.

File name, alt text and caption do three different jobs

Write each one for the reader it actually has.

  • The filename is a concise label that may become part of the public image URL. Use enough words to identify the subject; there is no universal required count.
  • The text alternative conveys meaning or function for this context. Informative images need an appropriate description; functional images need an accessible purpose. Decorative or fully redundant images can use an empty alt. Complex figures may need their details in adjacent page text.
  • The caption is visible text for all readers, including screen-reader users. It can explain the source, date or significance without duplicating the alt text. In semantic markup, it normally uses <figcaption>; see HTML tags for blog posts.

Context changes the useful description. A beach photograph in a location guide may need the beach’s name; the same image in an environmental report may need the visible condition and date. Follow W3C’s alt decision tree rather than mechanically copying the filename into the alt attribute.

A descriptive filename is still a poor substitute for a missing accessible name. WebAIM explains that some image-only links with missing or empty alternatives may be announced using a filename or destination URL. Give a functional image the link’s purpose instead of relying on that fallback.

The 2025 Web Almanac sample found alt attributes on 60% of images on the median mobile page, with blank values on about 15%. Those percentages do not identify which blanks are errors: decorative images may correctly have empty alt text. The alt text extractor reports blanks as missing, so manually review their purpose. It reads served HTML, not images added later by JavaScript. Google’s image documentation also says it does not index CSS background images.

What else is inside the file: EXIF and IPTC

Google reads IPTC photo metadata embedded in the file itself: Creator, Credit Line, Copyright Notice, Web Statement of Rights, Licensor URL and Digital Source Type, the field that can mark an image as AI-generated. Google Images uses them to show who made an image and how it can be licensed, including the Licensable badge, and structured data on the page does the same job if the embedded metadata does not survive your tools. If the photo is someone else's, read whether you can use any image on your website first.

Embedded metadata may include camera details and GPS coordinates, depending on capture and export settings. Review private location data before publishing. Compression and conversion can also remove useful creator, copyright and licensing metadata. Keep an archival original, check required credits and verify what survives in the published file. If you use the metadata cleaner, run it before the final filename step; its output has a tool-generated basename and a format-specific extension.

How to read other advice on image file names

Treat exact word counts, filename scores and keyword formulas as workflow heuristics unless a primary source supports a requirement. Be wary of promises that a rename alone moves an image into the top results. Check what a tool measures: strings, pixels, delivered URLs and accessible meaning are different things.

For new uploads, a descriptive name is a useful habit. For existing images, weigh that small improvement against changing a public URL. In Grigora’s classic image block, set the Alt Text field after upload. On an AI-built site, request the appropriate description in the AI Editor and inspect the published result. The final check is the real page: the image loads, its description fits its purpose, and no required attribution has disappeared.

Image file name FAQs

Get the next guide by email

Practical writing on building a site, growing an audience and sending email people open. No more than one a week.

Karan Singh Bhakuni

118 articles on the Grigora blog

More on Guides