Retrieve media objects - MediaImage.Image is null when it shoudn't

rko_tilt
Tourist
8 0 3

Hello 🙂
Im using GraphQL API version "2024-01".
Trying to get media image object by quering for product:

"media(first: 100) {
	edges {
		node {
			... on MediaImage {
			alt
			mediaContentType
			preview {
				image {
				id
				altText
				url
				}
			}
			status
			id
			image {
				altText
				url
			}
		}
	}
}}"


For most of the images in the product it works fine, but some of the MediaImage objects have null in Image property (even tho thier status is "READY"), for example:

 

{
    "Node": {
        "alt": "#rozmiar_100x50",
        "mediaContentType": "IMAGE",
        "preview": {
            "image": {
                "id": "gid://shopify/ImageSource/46188899533134",
                "altText": "#rozmiar_100x50",
                "url": "https://cdn.shopify.com/s/files/1/0758/2266/1966/files/GORA_100x50_4114d394-9523-48e9-91c3-e6ad0947bd53.png?v=1710197505"
            }
        },
        "status": "READY",
        "id": "gid://shopify/MediaImage/46188507758926",
        "image": null
    }
}

 

 Is there some sort of rule for null images that i don't know of, or is that a bug on shopify side? Shoudn't "image" be not null as long as "status" is ready? I thought maybe it's an error on my side during deserialization, but most of the images work correctly, just some doesnt.

Replies 0 (0)