Use webp for thumbnails

This commit is contained in:
rubenwardy
2023-11-10 18:57:49 +00:00
parent 5ce5684ca6
commit 4578cb157f
8 changed files with 57 additions and 35 deletions

View File

@@ -10,8 +10,8 @@
{% endblock %}
{% block headextra %}
{% if package.get_thumb_url(3, True) %}
<meta name="og:image" content="{{ package.get_thumb_url(3, True) }}"/>
{% if package.get_thumb_url(3, True, "png") %}
<meta name="og:image" content="{{ package.get_thumb_url(3, True, "png") }}"/>
{% endif %}
{% endblock %}

View File

@@ -9,8 +9,8 @@
{% endblock %}
{% block headextra %}
{% if package.get_thumb_url(3, True) -%}
<meta name="og:image" content="{{ package.get_thumb_url(3, True) }}"/>
{% if package.get_thumb_url(3, True, "png") -%}
<meta name="og:image" content="{{ package.get_thumb_url(3, True, "png") }}"/>
{%- endif %}
{% endblock %}

View File

@@ -12,8 +12,8 @@
{% endblock %}
{% block headextra %}
{% if package.get_thumb_url(3, True) -%}
<meta name="og:image" content="{{ package.get_thumb_url(3, True) }}"/>
{% if package.get_thumb_url(3, True, "png") -%}
<meta name="og:image" content="{{ package.get_thumb_url(3, True, "png") }}"/>
{%- endif %}
{% endblock %}
@@ -261,7 +261,7 @@
{% if ss.approved or package.check_perm(current_user, "ADD_SCREENSHOTS") %}
<div class="carousel-item {% if loop.index == 1 %}active{% endif %}">
<a href="{{ ss.url }}" target="_blank">
<img class="img-size w-100" src="{{ ss.url }}" alt="{{ ss.title }}" title="{{ ss.title }}" />
<img class="img-size w-100" loading="lazy" src="{{ ss.url }}" alt="{{ ss.title }}" title="{{ ss.title }}" />
</a>
</div>
{% endif %}