Product image SKU & filename naming conventions

Deterministic slugs, sensible separators, and de-duplication — the rules behind a catalog that stays tidy.

A naming convention is a small set of rules that decides what every file and SKU is called, before you have any files to name. Agreeing on the rules once — and applying them the same way every time — is what separates a catalog you can search, sort, and re-import from a folder of mystery images. This guide lays out conventions that work for small sellers and scale as the catalog grows.

Rules, applied consistently. AltForge encodes these conventions — lowercase, accent-stripping, separator choice, length limits, de-duplication — so every row in a batch follows the same rules automatically, in your browser.

What makes a good SKU

A SKU (stock keeping unit) is your internal identifier for a product or variant. Good SKUs are short, unique, and stable. They should be human-scannable but never change once assigned. A common structure combines a category prefix, a sequential number, and a variant code:

APR-018-NAT   →  category APR (apron), item 018, variant NAT (natural)
MUG-042-SGE   →  category MUG, item 042, variant SGE (sage)

Avoid encoding volatile facts (price, season, stock level) into a SKU — those change, and a SKU should not. Keep it ASCII, uppercase for readability, and hyphen-separated.

Deterministic slugs

A slug is the filename-safe, URL-safe form of a title. "Deterministic" means the transformation is pure: the same input always produces the same output, with no randomness and no hidden state. That property is what lets you re-run a batch and get identical names, or regenerate a single image months later and have it match its siblings. The standard slugging steps are:

  1. Lowercase everything.
  2. Transliterate accents: naïve cafénaive cafe.
  3. Replace any run of non-alphanumeric characters with a single separator.
  4. Trim leading/trailing separators.
  5. Cap the length (60–80 characters is plenty) without cutting mid-word where avoidable.

Choosing a separator

Use the hyphen (-) as your word separator in filenames and URLs. Search engines interpret hyphens as spaces between words; underscores are treated as joiners, so linen_apron can be read as one token. Reserve underscores, if you use them at all, for a single field boundary (e.g. separating SKU from slug) and stay consistent. Never use spaces — they become %20 in URLs — and avoid other punctuation entirely.

Field order and structure

Decide the order of components once and keep it forever. A dependable filename structure is:

{sku}-{title-slug}-{variant}-{index}.{ext}

Leading with the SKU groups every photo of a product together when files are sorted alphabetically. The trailing index orders the set. The extension stays lowercase (.jpg, not .JPG) for consistency across systems.

De-duplication

Even with good rules, two different photos can slug to the same string — two "natural linen apron" shots, for example. Never let names collide. The safe rule is to append an incrementing numeric suffix to any repeat: the first keeps the base name (or gets -1), the next becomes -2, and so on. Make the rule automatic so it is applied identically every time, and zero-pad if any single product can exceed nine images so that -02 sorts before -10.

Putting it together

With conventions fixed, a full example set looks like this:

apr-018-linen-apron-natural-1.jpg
apr-018-linen-apron-natural-2.jpg
apr-018-linen-apron-charcoal-1.jpg
mug-042-stoneware-mug-sage-1.jpg

Every name is lowercase, hyphen-separated, SKU-anchored, variant-aware, and ordered — readable to you and to a crawler, and safe to drop straight into a URL.

Write the convention down. A naming scheme only pays off if it is applied the same way every time. Keep a one-line spec with your catalog, and let a tool enforce it rather than relying on memory.

Draft alt text & clean filenames in your browser

AltForge is a free, privacy-first tool. Nothing is uploaded — images and CSVs are processed entirely on your device.

Launch the free tool →

Related: Bulk rename product photos · Preparing a rename manifest · Alt text for Etsy