mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
image posts: fall back to url when thumbnail does not work
This commit is contained in:
parent
139feb49c9
commit
9424f41d87
1 changed files with 6 additions and 2 deletions
|
@ -24,8 +24,12 @@
|
||||||
{% if post.edited_at %} edited {{ moment(post.edited_at).fromNow() }}{% endif %}
|
{% if post.edited_at %} edited {{ moment(post.edited_at).fromNow() }}{% endif %}
|
||||||
</small></p>
|
</small></p>
|
||||||
<div class="post_image">
|
<div class="post_image">
|
||||||
<a href="{{ post.image.view_url() }}"><img src="{{ post.image.view_url() }}" alt="{{ post.image.alt_text }}"
|
{% 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>
|
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>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue