So I asked the AI for a query that would give me all products without images. I honestly didn’t expect a response, was totally excited that I got a response and then disappointed that it didnt work.
query ProductsWithoutImages {
products(first: 10, query: "-image:*") {
edges {
node {
id
title
handle
}
}
pageInfo {
hasNextPage
}
}
}
It’s something that I have wanted for a while and is even more relevant in recent times since image processing has become increasingly unreliable. I have noticed recently that when creating products that images are being dropped without warning or indication that the image could not be processed. Both with the now deprecated REST api (but less so) and with the graphql api (in my opinion totally unreliable with no warnings or errors).
My only conclusion is that Shopify has recently (within the last 6 months) changed how images are processed. I have an almost 25% drop rate or more with ProductSet mutation with files, and < 2% drop rate with the REST API. Its not a huge number, but I would at least like some kind of feedback or warning that something has gone wrong instead of simply a return value which contains less images that I sent. The images are all small in size well below the 20mb max (most are in the 100-200kb range) but they are simply getting dropped. I ended up “downgrading” my product create code from GrapqhQL to REST because of this.
But I digress…
The above query would come in real handy, if it actually worked, to quickly find which products don’t have images allowing me to quickly “repair” them.
Cheers,
Gary