perf: add width and height to img elements
This commit is contained in:
parent
17546197a1
commit
6abe3d87e0
1 changed files with 7 additions and 2 deletions
|
@ -90,7 +90,8 @@
|
||||||
box-shadow: 5px 25px 10px -25px rgba(34, 34, 34, 0.15);
|
box-shadow: 5px 25px 10px -25px rgba(34, 34, 34, 0.15);
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
margin: 15px 0 1em;
|
margin: 15px 0 1em;
|
||||||
object-fit: cover;
|
object-fit: contain;
|
||||||
|
height: auto;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-wrap: balance;
|
text-wrap: balance;
|
||||||
}
|
}
|
||||||
|
@ -266,6 +267,8 @@
|
||||||
<a href="{{ media.url }}">
|
<a href="{{ media.url }}">
|
||||||
<img
|
<img
|
||||||
class="media"
|
class="media"
|
||||||
|
width="{{ media.meta.small.width }}"
|
||||||
|
height="{{ media.meta.small.height }}"
|
||||||
src="{{media.preview_url}}"
|
src="{{media.preview_url}}"
|
||||||
alt="{{ media.description or 'media attachment' }}"
|
alt="{{ media.description or 'media attachment' }}"
|
||||||
title="{{ media.description or 'media attachment' }}"
|
title="{{ media.description or 'media attachment' }}"
|
||||||
|
@ -337,7 +340,9 @@
|
||||||
<a href="{{ media.url }}">
|
<a href="{{ media.url }}">
|
||||||
<img
|
<img
|
||||||
class="media"
|
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' }}"
|
alt="{{ media.description or 'media attachment' }}"
|
||||||
title="{{ media.description or 'media attachment' }}"
|
title="{{ media.description or 'media attachment' }}"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue