Hi,
I am trying to change the depreciated render rimg and update it to something native to Shopify. These are the two that I am trying to change, but my images look stretched out for some reason, and none of the data is being passed correctly.
Code 1:
{%
render ‘rimg,’
img: title_card_block.settings.image
size: ‘500x750’,
crop: ‘center’,
canvas: true,
lazy: true
%}
trying to convert it like this:
{{ title_card_block.settings.image | image_url: width: 500, height: 750 | image_tag: crop: ‘center’, background: true, loading: ‘lazy’ }}
Code 2:
{%
render ‘rimg’,
img: background_image,
size: ‘1400x’,
class: ‘shoppable-image__image’,
crop: ‘center’,
lazy: true,
canvas: true,
attr: ‘data-shoppable-image-img’
%}
trying to convert it like this:
{{ background_image | image_url: width: 1400 | image_tag: class: ‘shoppable-image__image’, crop: ‘center’, loading: ‘lazy’, canvas: true, attr: ‘data-shoppable-image-img’ }}