Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi, Liquid newbie here.
Is it possible to alter the '244x' parameter in the img_url filter with a dynamic value that will be defined by the user in the Customizer?
{{ product | img_url: '244x' }}
Here's the schema:
{
"type": "text",
"id": "custom_image_size",
"label": "Custom Image Size",
"default": "244",
},
Screenshot of the Customizer:
In order to do this, I've added an "assign" variable like so:
{% assign size = "'" | append: section.settings.custom_image_size | append: "x'" %}
Finally, the object was changed to this:
{{ product | img_url: size }}
But it's not working. Is this even possible or I am missing something?
Thanks!
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025