Prodcut Image URL

Solved
Villiamjit
Excursionist
17 0 1

Hi,

 

Want to know that the once I upload the product image in Shopify using API its return me an image json that have image ID, ProdcutID and SRC and some other attributes.

 

And the SRC I got is "https://cdn.shopify.com/s/files/1/0020/3174/7161/products/imagepreloader.gif?v=1573039211"

 

I put the new image against that image id I just get using the API again. Now I got a new SRC against that Image ID

https://cdn.shopify.com/s/files/1/0020/3174/7161/products/imagepreloader.gif?v=1573036500

 

Now if I hit the old URL its give me an image and new URL also give me an image. So I want to know how long Shopify save the images on first SRC.

 

Thanks,
Villiam

0 Likes
vix
Shopify Staff
Shopify Staff
535 105 107

This is an accepted solution.

 

Hi @Villiamjit 

 

You will be able to use the first version as well, but by default, we will return the most current version always. The two Image URLs that you are seeing are the same. The v= param is a URL filter for the version. This doc here explains this: https://help.shopify.com/en/themes/liquid/filters/url-filters

 

Vix | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
Villiamjit
Excursionist
17 0 1

Hi @vix,

 

I can understand your points so the version images never delete from the Shopify CDN server. Is I am correct?

 

One more this Can you please help me how I update the product images SRC. don't want to remove old image and add new just need to update the current image SRC base on image ID.

 

I try with PUT Request  https://{store}/admin/api/2019-10/products/4271701491801/images/13377207337049.json?access_token={access_token}

 

{
"image": {
"id":13377207337049,
"position":2,
"src": "https://www.p2h5.com/subscription-product-icon.jpg"
}
}

 

But the image SRC not get replaced.

 

Thanks,
Villiam

0 Likes
Jeeny
New Member
1 0 0

Something else to browse is if the email customers have any picture limiters, for example, when being seen through an information association that would restrict the measure of pictures downloaded onto the detectors, to save information on somebody's gadget. It's conceivable this is another motivation behind why it might appear on one email customer, yet not another.

0 Likes