Accessing image focal points via Storefront API

tjames
Shopify Partner
2 0 1

According to the developer changelog here, as of 2023-04, image focal point data should be accessible via the Storefront api, however I cannot find any references to it in any of the image objects nor is it returned via the schema. Has anyone had any luck accessing this info via the storefront api?

Reply 1 (1)

PetterEck
Shopify Partner
1 0 0

You can access focalpoint in the media type for the graphql API. It is "hidden" under presentation and can be accessed as such: 

 

Media{

presentation {
asJson(format:IMAGE)
}

}