article.user

Solved
Highlighted
Excursionist
14 1 1

Hey,

I'd like to show author image on a blog post. There few solutions on the forum. According to this https://shopify.dev/docs/liquid/reference/objects/article that should be the correct object to use. But the problem is the article.user is null.

Here is the output of the article: 

Screen Shot 2020-02-26 at 23.25.42.png

0 Likes
Highlighted
New Member
3 0 0

Just re-assign author for the article. It seems like the Staff account that associates with the article has been removed from organization. So get author image later by `article.user.image`, make sure that author has uploaded the image, `null` otherwise.

0 Likes
Highlighted
Excursionist
14 1 1

Hey.

Thanks for the help.

 

The account is definitely there. I checked with other authors as well.

0 Likes
Highlighted
New Member
3 0 0

I face it, too. The workaround I've discovered is to let the staff account owners to re-upload the photo account. Just once is enough. I also mentioned it in my personal blog, you can read it here: Display Shopify author image in blog posts.

0 Likes

Success.

Excursionist
14 1 1

I figured it out. Only Account owner and people from Staff accounts group who have images will be displayed correctly on the blog post page. Collaborators will not

0 Likes