Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I have exported all my products to add article numbers in google sheets. Then I importet them back. I just realized that only the main image of each product has been imported, all other images are missing.
After this issue I tried something: I added a second picture to a particular product > exported that particular product > again deleted the second picture of this product in shopify > imported the csv file (product) back to shopify > the second pictures has not been imported back to shopify.
So what am I doing wrong?
Thanks for helping!
Solved! Go to the solution
This is an accepted solution.
Ok so I know I'm a little late to the party but I thought I'd bring to the table a solution that works perfectly and won't require any additional apps or hours of re-uploading images to your file repository and re-linking to your products, I had exactly the same issue described in this post, I exported my products to CSV, updated the prices and descriptions and when I re-imported the products only the first image and it's associated alt tag was present. During this import failure I got an import error like this:
Why it happens
As correctly stated further up this post, if you upload an image directly to a product the image gets deleted when you import changes, whereas if the image is uploaded to the files repository and you select it via the product it creates a link, this way the image path is retained when you make any changes via the Shopify product import.
I reached out to Shopify Support and they gave me the following solution:
When a product image is deleted a copy of the image is retained, this process pulls back in the saved copy of the image and creates a new link
The Solution
Using your preferred text editor open your CSV file and do a find and replace on all image paths, look for /products/ and replace all instances with /deleted/products/ then save your CSV file and import to your store.
The result of doing this is that the images are pulled from the /deleted/products repository and re-imported as new files with a new file name and re-links them to your products. (As a test, if you then export the product, you'll see that the image paths are different and no longer contain /deleted/).
Now go to a product in your Shopify admin and you'll see all your images are back with their corresponding alt tags!
I thought this may still be useful as it's still very much a current issue, thank you Daniela from Shopify Support for your solution.
I'm having the same issue! 😞 Anyone know why Shopify no longer recognizes the links to the secondary images?
Hi!
I know what my problem was. I uploaded the product pictures on the product pages. They are lost when you export these producta. You have to upload your pictures on the general pictures section in shopify:
https://accounts.shopify.com/store-login?redirect=settings%2Ffiles
By doing this, every single picture gets a URL which you copy and insert in your particular product page. Now, a link exists to each picture and they dont go lost.
Hope my explanation was fine and this is what you where looking for! Good luck
@Christin wrote:Hi!
I know what my problem was. I uploaded the product pictures on the product pages. They are lost when you export these producta. You have to upload your pictures on the general pictures section in shopify:
https://accounts.shopify.com/store-login?redirect=settings%2Ffiles
By doing this, every single picture gets a URL which you copy and insert in your particular product page. Now, a link exists to each picture and they dont go lost.
also look here: https://help.shopify.com/en/manual/products/import-export/using-csv#add-multiple-product-images-in-a...
Hope my explanation was fine and this is what you where looking for! Good luck
Image Audit on Shopify App Store
Thanks
This is an accepted solution.
Ok so I know I'm a little late to the party but I thought I'd bring to the table a solution that works perfectly and won't require any additional apps or hours of re-uploading images to your file repository and re-linking to your products, I had exactly the same issue described in this post, I exported my products to CSV, updated the prices and descriptions and when I re-imported the products only the first image and it's associated alt tag was present. During this import failure I got an import error like this:
Why it happens
As correctly stated further up this post, if you upload an image directly to a product the image gets deleted when you import changes, whereas if the image is uploaded to the files repository and you select it via the product it creates a link, this way the image path is retained when you make any changes via the Shopify product import.
I reached out to Shopify Support and they gave me the following solution:
When a product image is deleted a copy of the image is retained, this process pulls back in the saved copy of the image and creates a new link
The Solution
Using your preferred text editor open your CSV file and do a find and replace on all image paths, look for /products/ and replace all instances with /deleted/products/ then save your CSV file and import to your store.
The result of doing this is that the images are pulled from the /deleted/products repository and re-imported as new files with a new file name and re-links them to your products. (As a test, if you then export the product, you'll see that the image paths are different and no longer contain /deleted/).
Now go to a product in your Shopify admin and you'll see all your images are back with their corresponding alt tags!
I thought this may still be useful as it's still very much a current issue, thank you Daniela from Shopify Support for your solution.
You are the best!
Thanks, Buddy. God bless you!
@PaulCarlisle Thank you for this tip. You saved me hours of work finding and restoring images.
Thank You Very Much PaulCarlisle for sharing with us the solution... You saved me.
Thank you! This is the most on point and helpful answer I've ever read here!
This is the solution, Thanks Paul it worked for me, you saved me hours of work.
Nice one @PaulCarlisle, you saved my bacon.
Seriously though, I did a full CSV export -> price adjustment -> import of my catalogue in February 2022 and I didn't have this issue. Why oh why Shopify would you fatally hamstring the CSV import-export method in this way?
Working with the product export CSV's is fiddly enough as it is (e.g. always needing the primary row for a product with its html body etc to be positioned above the other rows, makes sorting the csv while editing slightly nerve wracking when it shouldn't be).
Thanks @PaulCarlisle
Your solution just made my day and saved lots of time that I have else would have spent in manually uploading images
A big thanks to @PaulCarlisle
U just save my life
This is absolutely brilliant and just saved me HOURS of work - thank you!
I'll add to it that you don't want to replace ALL instances of /products/ with /deleted/products - this did replace all of my secondary images but also deleted my main images (but it was easy enough to go back in the CSV and change the main images back to /products/). So, ONLY do the find and replace on the secondary images.
Thanks again for the extreme time save!
If you're like me and some URLs have structure that has no /product/ such as:
You can include /deleted/ before the second /files/ in the url like this:
And it should work fine. Be careful when using find and replace, you'll need an additional repeated identifier around /files/ becuase /files/ is used twice in the urls and replacing simply /files/ would lead to chaos. In my case it is 8/files/ as every url has it.
Enjoy.
My images don't have "/products/" in them to be able to resolve this.
Any other solution? Know of any apps?
About to pull my hair out!!
Share your link structure here and check my answer from literally yesterday :D. Its above your response.
lol! my bad- my freaking out must've made me miss your response.
thanks for bringing it back to my attention!! gonna test it later today. note: I didn't get any import errors from the multiple files I imported, and I'm not sure at what point the secondary images were deleted. hope this still works off a recent export.
here's an image I have:
https://cdn.shopify.com/s/files/1/0671/6394/7265/products/VKITCOM30WAWCO_Alt_8.jpg?v=1706545780
also would I essentially have to do this before every import? Me and my assistant have been doing some bulk updates of descriptions and tags and such, so there'd be multiple imports/exports.
I didnt get a notice either. The url you've sent seems fine. Does it not work?
I tried two SKUs and the secondary images are back! thank goodness.
BUT, the original main stock image is now gone lmao.
This is what I did: I imported the file with the find and replaced with "/deleted/" on all the images, imported, and noticed the main stock images were removed but all the secondary images were restored. Then followed what @InspiredIndigo said above- only putting "/deleted/" on the secondary images....and the main stock image is still gone after the import. -_- LOL I'm confused.
Ok I re-tried it with the first image normal, then added /deleted/ in the secondary images, and it looks like it's working! 😄
Will that solution work on this type if It has no /products in the filename?
Can I slide /deleted in somewhere else? EVERY one of my sites URLs are not valid now.
https://cdn.shopify.com/s/files/1/0550/0151/4028/files/SuperTurbosSide_dec21fdb-58f0-42a7-bfcc-56324... |
Yes absolutely, just replace /files/ with /deleted/files/
Check it out by clicking the link and you'll see your image again...
I'm having this same issue, however I'm sourcing images from a different website host (Dropbox). Do I really need to download all of those tons of images and re-upload them into Shopify? This will take hours and I'd prefer just to keep using the "Add media from URL" method....anyone have a fix?
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024