Shopify Theme Development - Help me understand the 'files' URL
I am developing a section that will need to pull images through from the 'files' folder.
I will have images
c.png all saved within the 'files' folder. I will then loop through an array of image names
array = [a,b,c].
My first question is, as I loop through am I able to go to one of the 'files' directories, say for
a.png with the file location of
Can I grab the start of the file URL
file:///cdn.shopify.com/s/files/1/0043/0886/0977/files/ then put an
a the value from the array in at the end?
file:///cdn.shopify.com/s/files/1/0043/0886/0977/files/ + array + .png
The above is just how I plan to use the variable and already have successful code so long as the 'files' URL start remains the same, but can anyone explain the files URL to me?
What is the
Yes they will be unique to your store here is a sample from a test store of mine
Nothing is the same (except the files and 1).
If you plan to change them with JS you will need to use RegEx and swap only the name part of the image.