Image transformedSrc deprecated, how to replace?

taufiq_ssc
New Member
1 0 0

Hello! Our public app fetches the webp version of product images via GraphQL transformedSrc, However, couple of weeks ago we noticed that a lot of images returned from the produced url are still in their original format, based on their content-type, eg: images/jpg

When i investigate the docs I found out the transformedSrc is being deprecated, as per this page:
https://shopify.dev/api/admin-graphql/2021-10/objects/image#fields-Image-OBJECT

"The location of the transformed image as a URL.

All transformation arguments are considered "best-effort". If they can be applied to an image, they will be. Otherwise any transformations which an image type does not support will be ignored. Use url(transform:) instead"

Is this the reason for the transformation not working?
When i tried to use url, I got error message that Image does not implement url field.
Can any of you help me solve this? How to avoid the deprecation?

Thank you

 

 

 

 

 

Is this the reason for our failure?


Link for

Reply 1 (1)
PublicApps
Shopify Partner
113 4 29

I've noticed this deprecation warning too in multiple places, e.g.:

Screenshot 2021-11-29 at 20.21.43.png

(This is from the GraphiQL in-app docs when using the Admin API version 2021-10.)

It says use `url` instead, but url is not a field on Image. Can't find anything on an url field in the docs on shopify.dev either.

Just trying to help out.

 

Need store customizations? Then contact me.