How can I use the API to upload a common image to all products?

Topic summary

Goal: Add a single, shared image as the final thumbnail on every product, stored on a CDN so updating the file updates all products without reuploading.

Key finding: Shopify does not reference external image URLs for product media. When using the productUpdate API with media (alt, mediaContentType, originalSource), Shopify ingests the image and creates its own copy on Shopify’s CDN. Changing the original CDN file will not affect product images already attached.

Proposed workaround:

  • Store the shared image’s CDN URL in a product metafield (a custom field on the product).
  • Modify the theme (product page’s media-gallery) to render this metafield image as the last thumbnail, so it opens in the same viewer as other product images.

Status and implications: There is no API-only solution to achieve a live-linked common image across products. The feasible path requires theme customization to integrate the metafield image into the gallery. The discussion remains open; an offer for custom implementation was made.

Summarized with AI on January 12. AI used: gpt-5.

I have an app that uploads products from our database, with between 1 and 10 images.

We want all products to have an additional image as the last image, and want this stored in the CDN with the idea that, if it needs changing, we could modify the file in the CDN and have it affect all the products without needing to reupload

I’ve uploaded a test image to the CDN to try it, but when I add it to a product using the productUpdate API it is effectively using the CDN file and creating a copy of it - changing the file in the CDN does nothing to the image on the product.

I could only find three parameters in the new “media” section, which I’m populating as follows:

media:
[
  {
    alt: "My Alt Text"
    mediaContentType: IMAGE
    originalSource: "https://cdn.shopify.com/s/files/PATH_TO_IMAGE"
  }
]

Is there a way for me to achieve what I want to do using the API?

Hi @Jedi_Lofty ,

Shopify product don’t point to any third-party image links, when we update image using CSV or API.

Shopify download that image to our server and create a new file with different name, therefore your idea of providing the image.

I don’t think will work.

However to achieve this you can create a metafield at product level and assign this CDN URL in that.

Now edit the theme template so that theme able to show the image.

Hope this will help…

Thank you for your reply.

I thought about doing that, but I have not been able to find a way to add the image into the product images. We want it to appear at the end of the product images as a thumbnail so that a customer can click it and see the full version in the same area as the other product images.

This can be done using custom dev in theme in media-gallery file for product page.

Let me know if you need our service to implement the same.

Request you to connect over the WhatsApp, if interested.