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.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025