DEV Community

member_ef7b3e07
member_ef7b3e07

Posted on AI-assisted

How to catch undersized product images before a CSV feed update

A supplier sends a new catalog export on Friday afternoon. The image URLs look fine in the spreadsheet, but a successful download only tells you that a file exists. It doesn’t tell you whether the image is big enough, or whether the replacement your supplier sent belongs to the same variant.

Set up an audit sheet to record the stable variant ID, image URL, measured width, and measured height. Keep candidate replacements in a separate table keyed by that same variant ID. For this example, use an internal minimum of 500 px on both sides. Substitute your actual channel requirements when you use this workflow.

If you start from a Shopify export, select the image column that matches your audit. Variant image URL is for a specific variant. Product image URL is for the product gallery, where additional rows can contain only the product handle and the image URL. Keep those gallery rows separate from your variant audit, and leave a blank variant image URL for review if you cannot match it to a specific variant. Use the replacement CSV to review approved changes, then map them back to the original Shopify columns before importing. Shopify product CSV guide

Variant Measured image Candidate Audit decision
SKU-BLUE-M 800 × 800 None Keep the existing URL
SKU-BLUE-L 480 × 900 Approved 900 × 900 image for BLUE-L Include in the replacement CSV
SKU-RED-M 640 × 320 900 × 900 image for RED-L Send to manual review
SKU-RED-L Could not read image None Retry or review before approving
  1. Check both dimensions. A 480 × 900 image fails this example’s minimum even though it’s tall enough.
  2. Treat unreadable images as a separate outcome. A failed fetch leaves the dimensions unknown.
  3. Only export a replacement when it matches the exact variant and you’ve approved it. Similar names and images are easy to confuse across sizes and colors.
  4. Keep the review rows separate and start with a small batch. Before applying your replacement CSV, compare its variant IDs and old URLs with the source export. Save the original feed so you can roll back the update.

These four rows are illustrative. I maintain the Product Feed Image Size Checker, which has a sample audit in Apify if you want to see the audit view and replacement CSV together.

Disclosure: AI assisted in drafting this tutorial.

Top comments (0)