Pull non-featured image instead of featured image on atomated blog list


#1

Would it be possible to swap out which image gets pulled for our blog home page list?

Right now it's set to pull the featured image, but because our featured image is wide and skinny, that means our featured image is the wrong size for all of our social posts! https://blog.hubb.me/

I'm hoping to set the blog home page to pull the non-featured image, or figure out some sort of OG workaround for blogs.

Thank you!


#2

Hi @ClariceG,

Most blog listing templates pull the featured image using logic similar to this:

{% if content.post_list_summary_featured_image %}
  <div class="hs-featured-image-wrapper">
    <a href="{{content.absolute_url}}" title="" class="hs-featured-image-link">
      <img src="{{ content.post_list_summary_featured_image }}" class="hs-featured-image">
    </a>
  </div>
{% endif %} 

It's possible to alter this to use a different image, but you'd need to create a custom HubL module and select the image you'd like to appear in the listing page. There isn't an easy way to dynamically select a non-featured image to display on the listing page. Check out the HubL docs below for more information on creating custom HubL modules: