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?
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025