Solved

Can I assign unique featured images to each article on Shopify?

greevesh
Excursionist
15 0 6

https://t6jgi1v6yzzr8wsj-57335021729.shopifypreview.com

Password - rubrao

I have three articles.

I've included a section that allows me to add a featured image for the articles.

I want each article to have its own unique featured image.

If you select one featured image on one article, then that image becomes the featured image for every article.

I want to have the ability to select a unique image for every article from the 'Featured Image' section.

What code can I use to enable this?

You'll see that all three articles have to have the same image via the 'Featured Image' section.

I don't want this. I want each article to have its own image.

 

dfdklfjdkfjel.PNGdkfjdkfdj.PNGsefjlefj.PNG

Accepted Solution (1)
Akibhusen
Shopify Partner
715 121 147

This is an accepted solution.

HI @greevesh ,

 

Put the below code in your 'article-template.liquid' file.

keep the code where you want the image like before/after the blog title.

 

<img src="{{ article.image.src | img_url: '500x' }}" />

View solution in original post

Replies 6 (6)

Akibhusen
Shopify Partner
715 121 147

Hi @greevesh ,

On each article page, there is only one section is called. So, whenever you open the article page it's called that common section. 

 

You can either fetch the feature image which are set to the blog post or if you don't want to fetch feature image then you can used metafeld app to call unique image for each artical.

greevesh
Excursionist
15 0 6

Hi there.

Thanks for the reply.

I'd like to use the first solution you suggested.

I want to fetch the feature image that is set on each blog post so that each page has its own image.

Do you know a Liquid solution for this?

I'd rather not install any apps if I don't have to.

Akibhusen
Shopify Partner
715 121 147

This is an accepted solution.

HI @greevesh ,

 

Put the below code in your 'article-template.liquid' file.

keep the code where you want the image like before/after the blog title.

 

<img src="{{ article.image.src | img_url: '500x' }}" />

Akibhusen
Shopify Partner
715 121 147

hi @greevesh ,

 

Hope this code is work well for you.

greevesh
Excursionist
15 0 6

Thank you! 🙂

Akibhusen
Shopify Partner
715 121 147

Hi @greevesh ,

Can you please mark it as an accepted solution so everyone should know that you got the right answer.