Method to identify product.media of type MediaImage, across shops?

Is there a way to identify media of type MediaImage, across shops?

Scenario: we would like to synchronize images between two or more shops owned by the same merchant.

For this question, let’s assume that the merchant:

  • creates a product with images on shopA,
  • exports the product as a .csv from shopA,
  • imports the .csv into shopB.

Both shops now have the same (well, not quite, but that is another story) product.

Even in this contained scenario, we have so far been unable to reliably identify MediaImages:

  • The file name can change,
  • both the file size, and the hash of the file can change,
  • the originalSource for shopA and shopB is different.

So, is there any method by which we can identify which image is which?


Note: because Shopify changes the images upon being uploaded, repeatedly deleting and creating images when a change is detected would result in an ever decreasing quality, at least for the most popular image format for product photos, namely jpeg.

If you use the same source url for both images, you could use that to tie them together as you get original source url on the images.

Alternatively you could stich them together using your own metafields on the media items

Hi @JordanFinners ,

Thanks for thinking along! If this were a group of shops I would run myself, both options you mention could work.

However, this is part of an App aimed at merchants; merchants do all sorts of things. So both options would fail.

Even in the limited scenario I described that uses Shopify’s build in .csv import/export, it would fail, because ShopB would have ShopA as the original source, and ShopA would have an upload as the original source.

I don’t think image metafields survive an import/export either.