[ENTITY][AttachmentThumbnail] Every image should have width and height attributes

This commit is contained in:
2021-09-25 13:12:32 +01:00
parent 808da203ad
commit a681acae67
9 changed files with 60 additions and 15 deletions

View File

@@ -1,7 +1,10 @@
<figure>
{% set thumbnail = attachment.getThumbnail() %}
<img class="u-photo"
alt="{{ attachment.getBestTitle(note) }}"
src="{{ attachment.getThumbnailUrl() }}">
src="{{ attachment.getThumbnailUrl() }}"
width="{{ thumbnail.getWidth() }}"
height="{{ thumbnail.getHeight() }}">
<figcaption><a
href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getBestTitle(note) }}</a>
</figcaption>