How do I add a featured image for related blog posts found on the post template page? So far, I've seen a lot of answers for adding a featured image to recent posts, but nothing for related posts.
How can I do this in Hubl?
My related section looks like this:
<div class="related-post-wrap">
<h3>RELATED</h3>
{% set max_posts = 3 %}{# Set the max number of related posts to be output to the page here #}
{% set post_list = [] %}
{% for topic in content.topic_list %}
{% set post_list = post_list + blog_recent_topic_posts('group.id', topic.slug, max_posts + 1 ) %}
{% if loop.last %}
{% set post_list = post_list|sort(true, false, 'publish_date')|unique('name') %}
{% set i = 0 %}
{% for post in post_list %}
{% if content.absolute_url != post.absolute_url and i < max_posts %}
<div class="hs-postlisting-item">
<a href="{{post.absolute_url}}">{{ post.name}}</a>
</div>
{% if post.topic_list %}
{% for topic in post.topic_list %}
{% endfor %}
</span>
{% endif %}
{% set i = i + 1 %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</div>