Image focal points via the admin api?

Solved

Image focal points via the admin api?

ejb1
Shopify Partner
7 1 0

I'm trying to get image focal point information from the admin graphQL api, but I can't seem to find it. The changelog https://shopify.dev/changelog/access-image-focal-point-from-the-storefront-api implies that it should already have been available in the admin API but I haven't been able to find it.

 

Is it actually not there or am I missing something? Any help would be very appreciated!

Accepted Solution (1)

lizk
Shopify Staff
246 58 78

This is an accepted solution.

Hi there 👋

Thank you for reaching out! You are correct Focal Points are not avialable via the Admin API. I have updated the changelog post to reflect this.

They are accessible on MediaPresentation Object in the asJson field in the storefront API. 

And example query could look like the following.

{
  shop {
    brand {
      logo {
        presentation {
          asJson(format:IMAGE)
        }
      }
    }
  }
}

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 2 (2)

lizk
Shopify Staff
246 58 78

This is an accepted solution.

Hi there 👋

Thank you for reaching out! You are correct Focal Points are not avialable via the Admin API. I have updated the changelog post to reflect this.

They are accessible on MediaPresentation Object in the asJson field in the storefront API. 

And example query could look like the following.

{
  shop {
    brand {
      logo {
        presentation {
          asJson(format:IMAGE)
        }
      }
    }
  }
}

To learn more visit the Shopify Help Center or the Community Blog.

ejb1
Shopify Partner
7 1 0

Thanks for confirming this. Is there a way to query all image files from the storefront API, like I can in the admin API? I'm not seeing a way to do what I'm trying to do unfortunately.

 

Are there any plans to add focal point to the admin API?