Understand "Files" URL Structure

Solved
api
New Member
3 0 0

I'm very new in Shopify.

Can someone help me how this URL structure works?

For example when i uploaded my photo in the product page and use in product description. The html img src will link to https://cdn.shopify.com/s/files/1/0496/1950/1218/products/mountain2_480x480.jpg?v=1601961395

If i uploaded my image  in Setting > Files then the url will be https://cdn.shopify.com/s/files/1/0496/1950/1218/files/mountain2.jpg?v=1602039749

May i know is this /1/0496/1950/1218 a unique code and not going to change forever? Any docs on how this unique code been structured.

And also any idea about the v=1602039749  what is the point having this information behind the URL.

Any help would be appreciated...


0 Likes

This is an accepted solution.

Hi api,

when you upload files through Setting > Files don't worry about the URL path. It will not change.

About the ?v= parameters it identifies the version of the image and it is useful when you want to replace the same image with a new one, because it solves the caching problem.

Suppose that you have upload an image called logo.png

Shopify adds a random number after ?v=

If you delete this file and you another one with the same name, the whole path will remain the same, but the version number will change.

In this way if you use one of those image in any of your website pages, when a user loads that page the new version of the image will be downloaded.

 

• If the problem is solved remember to click ✅ to Accept Solution
• Press Like, if the answer was helpful
• Shopify/Shopify Plus custom development, optimization and consulting. You can hire me here.
0 Likes
api
New Member
3 0 0

@drakedevThanks for the reply. Yea i am worrying the path will auto change after certain period of time. How about the image under product description and product. The path also not going to change right?

Because I'm working on the large dataset for the product. So I'm planning to upload all the products information via CSV import method. That's why i need to filter out and replace all the images url path according to shopify format in the CSV file.

Anyway, thanks for the explanation.

 

0 Likes