image posts: fall back to url when thumbnail does not work

This commit is contained in:
rimu 2024-01-05 11:10:10 +13:00
parent 139feb49c9
commit 9424f41d87

View file

@ -24,8 +24,12 @@
{% if post.edited_at %} edited {{ moment(post.edited_at).fromNow() }}{% endif %}
</small></p>
<div class="post_image">
<a href="{{ post.image.view_url() }}"><img src="{{ post.image.view_url() }}" alt="{{ post.image.alt_text }}"
width="{{ post.image.width }}" height="{{ post.image.height }}" /></a>
{% if post.image_id %}
<a href="{{ post.image.view_url() }}" rel="nofollow ugc"><img src="{{ post.image.view_url() }}" alt="{{ post.image.alt_text }}"
width="{{ post.image.width }}" height="{{ post.image.height }}" /></a>
{% else %}
<a href="{{ post.url }}" rel="nofollow ugc"><img src="{{ post.url }}" style="max-width: 100%; height: auto;" /></a>
{% endif %}
</div>
</div>
{% else %}