mirror of
https://github.com/welpo/tabi.git
synced 2026-05-02 04:17:35 +02:00
Remove metadata check to support avif and reduce CLS
This commit is contained in:
parent
7e0f022c92
commit
b5d84f5435
3 changed files with 3 additions and 7 deletions
|
|
@ -18,10 +18,9 @@
|
|||
<a rel="{{ rel_attributes }}" {{ blank_target }} href="{{ target_url }}" class="card">
|
||||
<div>
|
||||
{% if page.extra.local_image %}
|
||||
{% set meta = get_image_metadata(path=page.extra.local_image, allow_missing=true) %}
|
||||
<img loading="lazy" class="card-image" alt="{{ page.extra.local_image }}" src="{{ get_url(path=page.extra.local_image) }}" {% if meta.width %}width="{{ meta.width }}" {% endif %} {% if meta.height %}height="{{ meta.height }}" {% endif %}>
|
||||
<img loading="lazy" class="card-image" alt="{{ page.extra.local_image }}" src="{{ get_url(path=page.extra.local_image) }}" width="600px" height="600px">
|
||||
{% elif page.extra.remote_image %}
|
||||
<img loading="lazy" class="card-image" alt="{{ page.extra.remote_image }}" src="{{ page.extra.remote_image }}">
|
||||
<img loading="lazy" class="card-image" alt="{{ page.extra.remote_image }}" src="{{ page.extra.remote_image }}" width="600px" height="600px">
|
||||
{% else %}
|
||||
<div class="card-image-placeholder"></div>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue