Shopify Product Image File Naming: A SKU Convention That Scales
A simple, SKU-based file naming convention for product photos that makes bulk uploads, image order and variant images automatic, with examples and mistakes to avoid.
By Craftshift Team · · 3 min read
The best way to name product image files for Shopify is after the variant’s SKU, followed by an underscore and a number for the image order: SKU_1.jpg, SKU_2.jpg, SKU_3.jpg. That one rule lets you bulk upload thousands of images and land each one on the right product, in the right order, with the right variant image.
Why naming matters
A file name is the only reliable link between a photo and a product. Pictures of a blue shirt and a navy shirt look almost identical to software; SHIRT-BLU-M.jpg and SHIRT-NAV-M.jpg don’t. When names follow your catalog’s identifiers, every step after the photoshoot can be automated.
The convention
<identifier>_<order>.<extension>
- Identifier: the variant SKU (or barcode, product title, metafield value or variant ID).
- Order: an optional number for the image position. No number means first.
- Extension:
.jpg,.png,.webpor.gif.
Examples
| File | Lands on | Position |
|---|---|---|
TEE-WHT-S.jpg | SKU TEE-WHT-S | 1st (variant image) |
TEE-WHT-S_1.jpg | SKU TEE-WHT-S | 2nd |
TEE-WHT-S_2.jpg | SKU TEE-WHT-S | 3rd |
5901234123457.jpg | Barcode 5901234123457 | 1st |
Choosing the identifier
| Identifier | Choose it when | Watch out for |
|---|---|---|
| SKU | Every variant has a unique SKU | Duplicate or empty SKUs |
| Barcode | Products have EAN/UPC/GTIN codes | Products without barcodes |
| Product title | No SKUs or barcodes | Titles change and are often duplicated |
| Metafield | Photos use a supplier or ERP code | You need to fill the metafield |
| Variant ID | Re-uploading or fixing specific variants | Requires exporting IDs |
SKU is the default choice: it is unique, stable and usually already known by your photographer or supplier.
One photo for several variants
If a photo shows a product in every size, name it after the shared base code and use a “SKU contains image name” match:
TEE-WHT.jpg → TEE-WHT-S, TEE-WHT-M, TEE-WHT-L
Photos that carry extra text
Photographers often add angles or dimensions: TEE-WHT-S-front-2000x2000.jpg. You don’t have to rename them: an “image contains SKU” match finds the SKU inside the name, and the longest matching SKU wins so short codes can’t steal images.
Naming mistakes that break matching
- Trailing spaces:
TEE-WHT-S .jpg. Invisible, and the most common cause of a non-match. - Letters as order:
TEE-WHT-S_a.jpgis read as SKUTEE-WHT-S_a. - Mixed separators:
_1for some files and-1for others. - Missing extensions: some exports drop them, and such files never match.
- Duplicates:
TEE-WHT-S.jpgandTEE-WHT-S_0.jpgboth claim the first position.
Renaming an existing photo library
If your library doesn’t follow a convention yet:
- Batch rename with your operating system or a tool like Adobe Bridge, using a spreadsheet of old name → SKU.
- Or skip renaming: store each photo’s existing code in a product metafield and match on that.
- Or try AI matching, which reads inconsistent names the way a person would, and you review every match before upload.
A checklist for photographers and suppliers
Share this with whoever produces your images:
- Name each file after the variant SKU, exactly as in Shopify.
- Add
_1,_2,_3for additional images, main image without a suffix. - No spaces, no letters after the last underscore.
- JPG or WEBP, sRGB, 2048–4096 px on the longest edge, under 5 MB.
- One folder per delivery.
Summary
Name files SKU.jpg, SKU_1.jpg, SKU_2.jpg and bulk uploads become a matter of choosing a folder. Read the full naming guide or try it free on your own catalog.