ella theme how to update img_url to image_url

ella theme how to update img_url to image_url

DawnTawn
Shopify Partner
2 0 0

ella theme how to update img_url to image_url,

for example: img_url: 'master' =>image_url: format: 'mast     is this right?

 

 

Reply 1 (1)

Ahmad31
Shopify Partner
153 13 17

Hi @DawnTawn 

In the context of the Ella theme in Shopify, updating the img_url to image_url is part of transitioning from older to newer versions of Shopify's Liquid syntax. The img_url filter has been replaced with image_url in recent updates.

Here's how you can update the code:

  • Old syntax (img_url):

 

{{ product.featured_image | img_url: 'master' }}

 

  • New syntax (image_url):

 

{{ product.featured_image | image_url: 'master' }}
​

 

In your example, if you are updating from img_url: 'master', the correct syntax using the image_url filter would look like this:

 

{{ product.featured_image | image_url: 'master' }}

 

This syntax now works with the updated Shopify theme and Liquid API. Make sure you replace img_url with image_url in all relevant places in your theme files.

Love my work? Buy Me A Coffee
Hire Me: Email me Or Chat on Whatsapp
If you found my solution helpful, please like and accept it. Your support is greatly appreciated!