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.
-
The media field just contains a static preview image. It doesn’t contain video src info to be actually run the video.
-
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