Hey,
There is way to get the products images from js in product page without
touch the product.liquid?
Thanks!
Alon Golan
Hey,
There is way to get the products images from js in product page without
touch the product.liquid?
Thanks!
Alon Golan
Yes. Every product has a JSON endpoint which contains the image’s URL in it plus much more data.
For example, this product:
https://colourpop.com/products/glisten-up-vitamin-c
Can have most of its information viewed by adding .json at the end of the URL.
https://colourpop.com/products/glisten-up-vitamin-c.json
You just need to do a GET call of the product you want and get the image.
Naturally it requires basic Javascript knowledge to do so which is beyond the scope of this answer.
Kind regards,
Diego