Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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 79

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 79

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?