You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which is broken. If I'm on the product page, the image URL (correct) is
//cdn.shopify.com/s/files/1/0642/0537/products/100_4774.JPG.w560h847_medium.jpg?v=1409808948
The text was updated successfully, but these errors were encountered:
This simply requires the match to be more specific so that if the string .jpg occurs in the middle of the string as well as the end, it matches only against the last one. So in the resizeImage function this
var match = src.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?/i);
becomes
var match = src.match(/.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)($|?v=\d+)/i);
When using this script, the image URL is generated as
//cdn.shopify.com/s/files/1/0642/0537/products/100_4774_medium.JPG
which is broken. If I'm on the product page, the image URL (correct) is
//cdn.shopify.com/s/files/1/0642/0537/products/100_4774.JPG.w560h847_medium.jpg?v=1409808948
The text was updated successfully, but these errors were encountered: