Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
When wanting to crop images as aliases with GraphQL I use to be able to:
image {
...
lg: transformedSrc(maxHeight: 704, maxWidth: 2816, crop: CENTER)
xl: transformedSrc(maxHeight: 960, maxWidth: 3840, crop: CENTER)
}
However, transformedSrc is now deprecated, and we are to use: https://shopify.dev/api/storefront/2022-01/input-objects/ImageTransformInput. But it's not obvious how to correctly use a set of ImageTransformInputs as a transform argument for Image.url object. I've tried things such as...
xl: url(transform:"maxHeight: 960, maxWidth: 3840, crop: CENTER")
xl: url(transform(maxHeight: 960, maxWidth: 3840, crop: CENTER))
xl: url(transform{maxHeight: 960, maxWidth: 3840, crop: CENTER})
xl: url(transform[{ maxHeight: 960}, { maxWidth: 3840}, {crop: CENTER}])
I just get parse errors with every argument style I try, be it string, array, or object.
How do we correctly use ImageTransformInput as a set of arguments on the Image.url object?
Sometimes you just have to shout into the either...
Correct way to use an input_object as argument.
xl: url(transform: { maxHeight: 960, maxWidth: 3840, crop: CENTER })
does this api just generally suck or am I missing something? How can i just ensure the image is a specifc aspect ratio with a max height?
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024