本文へスキップ

Shopify product images missing or on the wrong product after sorting the CSV in Excel

Shopify's import guide warns that a CSV sorted in a spreadsheet editor such as Excel or Apple Numbers can separate products from their image links, and the images can be lost. Undo the sort or go back to an unsorted export, keep every product's rows together with its Title row first, and check the file before you import it.

起きること

  • After the import, some products have no images or fewer images than before.
  • An image shows up on a different product than the one it belongs to.
  • In the file, rows that contain only a URL handle and an image URL are bunched together at the bottom instead of under their product.
  • Rows with the same URL handle are no longer next to each other.

原因

  • Shopify's CSV guide puts all product details in a product's first row and, for each extra image, adds a row with only the URL handle and the image URL. Those extra rows have empty Title, Price and other cells.
  • Microsoft says Excel always places blank cells last, in both ascending and descending sorts. Sorting by Title, Price, Vendor or another column that's empty on image rows moves those rows to the bottom, away from their product.
  • If you sort only the selected columns (Continue with the current selection in Excel's sort warning), the sorted values are detached from the rest of each row. Microsoft warns that this disassociates the data, so an image URL can end up next to another product's handle.
  • Microsoft also notes that hidden rows aren't moved when you sort, which can mix rows from different products.
  • Shopify doesn't explain exactly how it reads rows that have been moved apart. Its warning only says that images might be lost, so don't rely on the URL handle alone to reconnect them.

修正方法

  1. If the file is still open in Excel and you haven't closed it, undo the sort with Ctrl+Z.
  2. Otherwise go back to an unsorted copy: the backup you made before editing, or a fresh product export from Shopify.
  3. Run the file through the validator. It flags products whose rows are split into separate groups, which usually means the file was sorted, and rows that have data but no URL handle or Title.
  4. If you have to repair the sorted file by hand, put every product's rows back together: the row with the Title and other product details first, then its variant and image rows. Check each image URL against the product it belongs to.
  5. The validator can't tell whether an image URL sits next to the wrong product. If only some columns were sorted, the file can look fine to the validator, so start again from an unsorted copy instead of repairing it.
  6. Save as CSV UTF-8 and run the validator again before you import.

例

修正前
URL handle,Title,Price,Product image URL,Image position
linen-shirt,Linen shirt,39.00,https://cdn.example.com/linen-shirt-1.jpg,1
summer-hat,Summer hat,25.00,https://cdn.example.com/summer-hat-1.jpg,1
linen-shirt,,,https://cdn.example.com/linen-shirt-2.jpg,2
summer-hat,,,https://cdn.example.com/summer-hat-2.jpg,2
修正後
URL handle,Title,Price,Product image URL,Image position
linen-shirt,Linen shirt,39.00,https://cdn.example.com/linen-shirt-1.jpg,1
linen-shirt,,,https://cdn.example.com/linen-shirt-2.jpg,2
summer-hat,Summer hat,25.00,https://cdn.example.com/summer-hat-1.jpg,1
summer-hat,,,https://cdn.example.com/summer-hat-2.jpg,2

Sorting by Title moved the image-only rows (empty Title) to the bottom. In the fixed file, each product's image row comes right after its first row again.

予防方法

  • Make a backup of your product data before you import, as Shopify recommends.
  • Avoid sorting a product CSV. If you need to sort to make edits, first add a helper column numbered 1, 2, 3… in the original order, sort the whole sheet back by that column when you're done, and delete it before saving.
  • When Excel shows a sort warning, choose Expand the selection so whole rows move together.
  • Check the file with the validator after every edit in a spreadsheet, before you import it into Shopify.

インポート前に CSV でこの問題を見つける

Skuvera はブラウザ上で商品 CSV を Shopify のルールに沿ってチェックし、ストアに反映される前にこうした問題を指摘します。無料、登録不要。

よくある質問

Does Shopify reject a sorted file?
Shopify's help center doesn't say the import fails. It warns that products can be removed from their image links and the images lost, so the import may appear to finish while images are missing.
Can I just sort the file by URL handle to fix it?
That puts rows with the same handle together, but it doesn't guarantee that the row with the Title comes first in each product, and it can't fix image URLs that were moved next to the wrong product. An unsorted copy is the safer starting point.
My images are already gone from Shopify. Can I import them again?
Yes, with a corrected file. But Shopify notes that if you removed products or images from your store after exporting, importing image URLs that point to them fails. Use image URLs that still work, such as your original image host.

出典

その他のデータ問題

2026年11月2日 更新