CMS Development

MichaelJ
Contributor | Partner
Contributor | Partner

Access content page feature image in template

Hi,

 

I'm trying to display a feature image (the one set in the page's Settings > Feature Image area) in a template's content.

 

I tried adding the following to a HTML module, but it doesn't work. HubSpot support tells me that this is only available in blogs.

 

<img src="{{ content.featured_image }}" alt="{{ content.featured_image_alt_text }}">

 

The only thing I can think of is using JavaScript to pull the feature image from the og:image from the header, but this seems awefully hacky.

 

 Has anybody solved this before in another way?

0 Upvotes
1 Reply 1
dennisedson
HubSpot Product Team
HubSpot Product Team

Access content page feature image in template

@MichaelJ

sadly, that is only a blog feature.

add to the ideas forum.  seems like a no brainer  

0 Upvotes