“Image Src is invalid” and the image that could not be downloaded
Validation failed: An error occurred while trying to download the image
Shopify does not store the URL you give it. It downloads the file and re-hosts it, which means the address has to work from Shopify's servers at the moment of import — not from your laptop, and not later.
Why Shopify raises it
Shopify’s product CSV reference describes Product image URL as “a publicly reachable http(s) URL” that “Shopify downloads at import time”. Three separate failures come out of that one sentence, and Shopify’s common import problems page names each:
- Validation failed: getaddrinfo: nodename nor servname provided, or not known — “caused when there is a mistake in the image URL. The image URL needs to have
http://in front of it. It also needs to be a publicly accessible direct link to the image.” This is the one a bare file name produces: there is no host to resolve. - Validation failed: An error occurred while trying to download the image — “An image file is missing.” The address was well-formed and the fetch failed: deleted file, 404, or a server requiring a login.
- The uploaded image exceeds the 20 megapixel limit — images may be “any size up to 5000 x 5000 px, or 25 megapixels”. A huge source photo is rejected even though the URL was perfect.
There is also Incorrect header check, where the advice is blunt: “Remove the image from that line and try again. If that resolves the issue, then try hosting the image somewhere else.” That is a corrupt or mislabelled file, not a bad URL.
How to find it in your CSV
Filter the image column to cells that do not begin http:// or https://. That one filter catches the three shapes that platforms really export:
- Bare file names —
knife-20cm.jpg. BigCommerce documents its image field as the “file name (if stored in WebDAV) or full URL”, so both forms appear in one export. - Platform-internal paths —
/h/o/hood-01.jpg. Magento stores files in an alphabetical folder structure and exports the relative path, which needs your media base URL prefixed. - Protocol-relative URLs —
//cdn.example.com/x.jpg. These work in a browser, which is why they survive in theme data, and fail here because there is no scheme.
Then spot-check a handful of the surviving URLs by opening them in a private window. A link that only works while you are logged in to the old platform will fail from Shopify’s side, and the CSV cannot tell you that.
How the converter prevents it
The image_url rule in src/lib/validate.ts tests every Product image URL and Variant image URL value with a real URL parse and requires the scheme to be http: or https:. Anything else is an error, with the offending value quoted and truncated:
“//cdn.example.com/board-01.jpg” is not an http(s) URL. Shopify downloads images over HTTP at import time — local paths and file names do not work.
That rejects bare file names, relative paths, ftp://, protocol-relative URLs and www.example.com/a.jpg without a scheme. What it cannot do is tell you whether a well-formed URL will actually serve a file — that would mean fetching your images from your browser, and this tool makes no network requests with your data. A 404 is still a 404.
Two related rules sit alongside it. position_integer requires Image position to be a whole number when an image URL is present, because positions start at 1 and increment per product. And alt_long warns when Image alt text passes Shopify’s 512-character maximum. The converter also handles the row structure for you: choose the split image list formula and a gallery cell becomes the first URL on the product row plus one extra row per remaining image, each carrying only the handle, the URL and the position — which is the shape Shopify’s reference describes for a product with several images.
What a correct fix looks like
Make the URLs absolute and public, and do it while the old store is still live. For Magento, prefix the media base URL. For a WebDAV file name, publish the files or re-upload them in Shopify afterwards. For protocol-relative URLs, add https:.
The order of operations matters more than people expect. Shopify re-hosts every image it manages to download, so once the import has run the old URLs no longer matter — but a product whose image failed has no image, and re-running the import later only works if the source is still serving the file. Import before you cancel the old platform, then check a sample of products before you cancel anything.
If an image is simply too big, resize it below 5000 × 5000 px rather than hoping. And if you would rather not migrate images by URL at all, clear the column: the validator warns that Product image URL is unmapped, which is an honest gap you can fill in the Shopify admin.
Before you retry the import
- Fix the file, not the symptom. Shopify reports the first failure it meets, so a second error usually appears once the first is cleared.
- Import into a development store or a draft-status batch first, so a half-correct file cannot put wrong data in front of customers.
- If you are overwriting existing products by handle, export your live products first: a blank cell in the import can erase a value that is currently there.
Column-by-column reference: the Shopify product CSV format. Nexum Gate is not affiliated with Shopify Inc.