perf: add width and height to img elements

This commit is contained in:
Ayo Ayco 2024-05-02 14:42:59 +02:00
parent 17546197a1
commit 6abe3d87e0

View file

@ -90,7 +90,8 @@
box-shadow: 5px 25px 10px -25px rgba(34, 34, 34, 0.15);
max-width: 100%;
margin: 15px 0 1em;
object-fit: cover;
object-fit: contain;
height: auto;
text-decoration: none;
text-wrap: balance;
}
@ -266,6 +267,8 @@
<a href="{{ media.url }}">
<img
class="media"
width="{{ media.meta.small.width }}"
height="{{ media.meta.small.height }}"
src="{{media.preview_url}}"
alt="{{ media.description or 'media attachment' }}"
title="{{ media.description or 'media attachment' }}"
@ -337,7 +340,9 @@
<a href="{{ media.url }}">
<img
class="media"
src="{{media.preview_url}}"
width="{{ media.meta.small.width }}"
height="{{ media.meta.small.height }}"
src="{{ media.preview_url}} "
alt="{{ media.description or 'media attachment' }}"
title="{{ media.description or 'media attachment' }}"
/>