Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Up until today I have been querying the Shopify GraphQL API with "originalSrc" in order to get product image sources. Now I see "originalSrc" is deprecated and that I should use "src" instead. My question is: how would this query with "src" look?
I have attempted to replace "originalSrc" with "src", which just returns a syntax error and I have not been able to find the solution anywhere online.
Here is my current (and deprecated) request
{
product(id: "gid://shopify/Product/6786957082804") {
id
images(first:10) {
pageInfo {
hasNextPage
hasPreviousPage
}
edges {
cursor
node {
originalSrc
id
}
}
}
}
}
Thanks in advance!
For future readers...
With the newest API updates, images is now deprecated. (Late 2023)
The new way to get image URLs is this:
{
product(id: "gid://shopify/Product/6786957082804") {
id
media(first:10) {
edges {
node {
... on MediaImage {
image {
url
}
}
}
}
}
}
}
This example will retrieve the URLs of all images, not including videos or other media types.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025