Get article author image through graphql api

Highlighted
New Member
2 0 0

I am trying to get the author's image through the graphql storefront API. How can this be done? The ArticleAuthor node does not have an image field. I find this odd since the author's image can be accessed in liquid using `article.user.image`.

0 Likes
Shopify Staff
Shopify Staff
135 6 29

Hey Pat,

Zameer here from the Shopify Developer Experience team.

Unfortunately, it's currently not possible to retrieve the author's image using the GraphQL API. You may only retrieve the image associated with the article itself.

0 Likes
Shopify Partner
1531 109 307

I think that object property is documented for Liquid, but doesn't actually work. Try it ;-)

I turn coffee in to code - since 1998
0 Likes
Shopify Partner
1531 109 307

btw Zameer Masjedee the Liquid object article.user.image still not working?

Just curious

I turn coffee in to code - since 1998
0 Likes
New Member
2 0 0

Karl Offenberger, I can confirm I was able to use article.user.image to pull the profile picture. This was on a shopify plus store if that makes any difference.

0 Likes
Shopify Partner
1531 109 307

Pat Rocchio thanks for the heads up - I couldn't retrieve the image, but that might be because it linked to my gravatar. Not sure now, but after uploading a aseparate image for the user profile, it's fine and working as you say. Great, learned something new again.

I turn coffee in to code - since 1998
0 Likes