Shopify creating duplicate image when I import products with image links

Im trying to migrate into shopify, & the system Im migrating from gives me the image names used on each product. Ive got about 4500 products with between 2-9 product images. So Ive put them in my img src column, with my shopify cdn address first (copied from an export of products where I have uploaded the images into the product manually). Ive uploaded the images to my files.

But Ive noticed that I then end up with my original image not used, & instead theres a duplicate created by shopify with a string of numbers on the end. This is not the same as Shopify not being able to use the same image on multiple products, this is where images are unique to that product.

Its very annoying & Im wondering if this is a known issue or the way Im importing them? For example Ive noticed that every image has some numbers after it (in addition tyo the numbers added by shopfy which are at the end of the file name. They arent always the same but a lot are. Heres an example

.jpg?v=1728307241

How can I stop this?

3 Likes

Hi Sue_de_Nimm,

This is indeed a known behavior. https://community.shopify.com/c/shopify-discussions/same-image-s-duplicating-across-multiple-products/td-p/2076969 is one of the more popular posts about this behavior.

My take on this is that this is the safest behavior for Shopify to perform in case you need to update the image for a particular product but leave the rest as is. Changes to images are less destructive when they’re dedicated to each product. However, this can make things harder to manage especially if you share the same image across several products and they will never become unique.

For such cases, you could add the product name as a prefix to the file name to differentiate between them better. If you don’t want to do this manually, I’ve built a file manager app that automatically does this for you depending on the folder the image, video or file is in - https://apps.shopify.com/simple-file-manager.

This way you can organize the multiple copies of the same image by products. You simply need to create a directory, name it the same as the product and the app will update it for you automatically. Here’s a short tutorial of the same - https://community.shopify.com/c/shopify-apps/update-product-media-in-a-jiffy-with-simple-file-manager/td-p/2697462

Additionally, the app has a feature to update all duplicate images with a couple of clicks.

Don’t hesitate to reach out if you need more help with navigating Shopify Files / Simple File Manager.

Hi I did read that thread but this is a slightly different problem. The files Im talking about are only used on the one product. But when I import my new products, linked to the image Ive uploaded beforehand, it creates a duplicate image & uses that on my product instead. So the image I uploaded is not being used on my product, only the new one. The original one is in the system with no linked products. Im going to end up with approximately 30,000 extra images.

When I import the product file to add the image (which has already been loaded) Im only putting the Shopify cdn link on the front, but when I export it after the images have been attributed theres a string of extra text after the file name. So Im not sure if Im importing them correcting in the image field.

Same problem here!! All these image duplicate files with a whole bunch of gibberish at the end of my original file name are definitely driving me insane! :weary_face: Definitely hoping for some help as well!! :folded_hands:

Although I don’t have a solution, I can tell you why it is happening. It’s funny neither of the guys from the “famous” thread got it.

You can use the same image for multiple products without it getting duplicated, but you would have to go to product’s media and search for the image inside the gallery, they selecting and adding it.

When you import images, although you use a link from Shopify, Shopify is still downloading the image into files as it would from any other domain. The random tail phrase at the end of the image names is nothing else but that - a random number. That is used because 2 images with the same name can’t coexist, just like 2 images inside the same folder on your pc.