Can't get media info in a product/update webhook

I asked similar question in December, but didn’t get an answer, so reasking.

Previous question – https://community.shopify.dev/t/struggling-determining-media-id-for-a-variant-in-webhook/3760

I’m trying to switch from images to media, so I can support video, etc. Also images are being deprecated I believe.

In the GraphQL for a product, I can get video info for media (SRC, etc).

But in the product/update webhook (including trying in the unreleased 2025-04 version), there are two problems.

  1. The media field just contains a static preview image. It doesn’t contain video src info to be actually run the video.

  2. The GraphQL for an media video is something like gid://shopify/Video/123 while the webhook for the same media image is gid://shopify/MediaImage/123 Yes, it is the same number, but I presume I’m not supposed to rely on that and I should really just be looking at the gid opaquely and in this case, differently in the GraphQL vs. webhook.

Context is that if I get a webhook, I am trying to avoid also having to call GraphQL to get more info. I expect the webhook would have everything I need about the media.

Thanks.

-Jeff

Hi Jeff,

The webhook’s limited media information is by design, as webhooks are intended to notify you of changes rather than provide comprehensive data. To avoid relying on the opaque GID format, I’d recommend always making a call to the GraphQL API to fetch the latest and most accurate media details.

Thanks, but that’s disappointing.

If I have to do a GraphQL call in my webhook handling for product/create and product/update because the webhook contains incomplete (no media SRC or other video info) or incorrect (wrong GID) information, that can get really expensive performance-wise.

-Jeff