Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I'm noticing that image URLs like this one:
https://cdn.shopify.com/static/sample-images/garnished.jpeg?width=700&crop=center
are rewritten once saved once by the HTML editor in the online store app to look like:
https://cdn.shopify.com/static/sample-images/garnished.jpeg?width=700&crop=center
HTML escaping the URL parameter with & breaks the functionality of the URL parameter and the crop does not crop in this case. This seems like a bug that needs to be fixed in the HTML editor used throughout Shopify. I reproduced the same issue in the product HTML editor.
Hi,
It is not an issue, these are HTML Entities
Okay right, but those HTML encoded symbols do not belong in image URLs.
I probably should have used a better example than an image that didn't need a crop. Look at these two:
works:
https://cdn.shopify.com/static/sample-images/garnished.jpeg?width=700&height=100&crop=center
doesn't work:
https://cdn.shopify.com/static/sample-images/garnished.jpeg?width=700&height=100&crop=center
So, in summary, if you try to use Shopify's own CDN image resize parameters inside of a Shopify HTML editor it gets broken on any subsequent saves of the editor.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024