JSON main product image v/s product images

Highlighted
Shopify Partner
17 1 6

I am creating a product using ruby/JSON

The product contains the main image and six secondary images. All images are different.
Product is created OK.

The product page shows images[0] through images[5]
Any collection including this product shows images[0]
Retrieving the JSON shows that image now is the same as images[0], i.e: the different picture initially specified in the image is not visible.

Below is the relevant extract of the defining JSON

Note that images[0] comes from .../medium/...
and image comes form .../small/...

As per 18-nov-2020, the images are there, you the reader can see that .../medium/... contains a water mark
and .../small/... does not.

"images":
[
{
"src":"http://about.martinr.com/shopify/medium/Mermaid_II.jpg",
"position":1
},
{
"src":"http://about.martinr.com/shopify/images/Mermaid_II/medium/Mermaid_II_A0.jpg",
"position":2
},
{
"src":"http://about.martinr.com/shopify/images/Mermaid_II/medium/Mermaid_II_A1.jpg",
"position":3
},
{
"src":"http://about.martinr.com/shopify/images/Mermaid_II/medium/Mermaid_II_A2.jpg",
"position":4
},
{
"src":"http://about.martinr.com/shopify/images/Mermaid_II/medium/Mermaid_II_A3.jpg",
"position":5
},
{
"src":"http://about.martinr.com/shopify/images/Mermaid_II/medium/Mermaid_II_A4.jpg",
"position":6
}
],
"image":
{
"src":"http://about.martinr.com/shopify/small/Mermaid_II.jpg",
"position":1
}

And this is what Shopify delivers when requesting the product as JSON

Note that images[0] and images are the same as the original images[0] were as they were different in the intended original.
i.e: the medium watermarked version is used when the small without watermark was intended.

"images":
[
{
"id":22762332094638,
"position":1,
"created_at":"2020-11-16T04:43:26+00:00",
"updated_at":"2020-11-16T04:43:26+00:00",
"alt":null,
"width":1024,
"height":684,
"src":"https://cdn.shopify.com/s/files/1/0510/1636/8302/products/Mermaid_II.jpg?v=1605501806",
"variant_ids":[],
"admin_graphql_api_id":"gid://shopify/ProductImage/22762332094638"
},
{
"id":22762332127406,
"position":2,
"created_at":"2020-11-16T04:43:26+00:00",
"updated_at":"2020-11-16T04:43:26+00:00",
"alt":null,
"width":600,
"height":402,
"src":"https://cdn.shopify.com/s/files/1/0510/1636/8302/products/Mermaid_II_A0_c4effb40-8f60-41a7-b44e-6555...",
"variant_ids":[],
"admin_graphql_api_id":"gid://shopify/ProductImage/22762332127406"
},
{
"id":22762332160174,
"position":3,
"created_at":"2020-11-16T04:43:26+00:00",
"updated_at":"2020-11-16T04:43:26+00:00",
"alt":null,
"width":600,
"height":402,
"src":"https://cdn.shopify.com/s/files/1/0510/1636/8302/products/Mermaid_II_A1_1071c1bb-70aa-454c-b69f-fa62...",
"variant_ids":[],
"admin_graphql_api_id":"gid://shopify/ProductImage/22762332160174"
},
{
"id":22762332192942,
"position":4,
"created_at":"2020-11-16T04:43:26+00:00",
"updated_at":"2020-11-16T04:43:26+00:00",
"alt":null,
"width":600,
"height":402,
"src":"https://cdn.shopify.com/s/files/1/0510/1636/8302/products/Mermaid_II_A2_03c9d68a-5d2c-42e5-8904-4ba7...",
"variant_ids":[],
"admin_graphql_api_id":"gid://shopify/ProductImage/22762332192942"
},
{
"id":22762332225710,
"position":5,
"created_at":"2020-11-16T04:43:26+00:00","updated_at":"2020-11-16T04:43:26+00:00",
"alt":null,
"width":600,
"height":402,
"src":"https://cdn.shopify.com/s/files/1/0510/1636/8302/products/Mermaid_II_A3_5e096684-672e-4ee9-8fe1-f04b...",
"variant_ids":[],
"admin_graphql_api_id":"gid://shopify/ProductImage/22762332225710"
},
{
"id":22762332258478,
"position":6,
"created_at":"2020-11-16T04:43:26+00:00",
"updated_at":"2020-11-16T04:43:26+00:00",
"alt":null,
"width":600,
"height":402,
"src":"https://cdn.shopify.com/s/files/1/0510/1636/8302/products/Mermaid_II_A4_9e043c92-343d-4e37-a5a4-0b4e...",
"variant_ids":[],
"admin_graphql_api_id":"gid://shopify/ProductImage/22762332258478"
}
],
"image":
{
"id":22762332094638,
"position":1,
"created_at":"2020-11-16T04:43:26+00:00",
"updated_at":"2020-11-16T04:43:26+00:00",
"alt":null,
"width":1024,
"height":684,
"src":"https://cdn.shopify.com/s/files/1/0510/1636/8302/products/Mermaid_II.jpg?v=1605501806",
"variant_ids":[],
"admin_graphql_api_id":"gid://shopify/ProductImage/22762332094638"
}

An explanation of what went wrong would be appreciated.

 

0 Likes