Load potentially external images without referrer
This commit is contained in:
parent
8c72558ca6
commit
5ff5ad113b
3 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
|||
<figure class="media-left column is-3 image-column">
|
||||
{% if page.list_image_url %}
|
||||
<a href="{% pageurl page %}" class="image" title="{{ page.title }}">
|
||||
<img src="{{ page.list_image_url }}" alt="{{ page.hero_image_alt }}" loading="lazy" decoding="async" />
|
||||
<img src="{{ page.list_image_url }}" alt="{{ page.hero_image_alt }}" loading="lazy" decoding="async" referrerpolicy="no-referrer" />
|
||||
</a>
|
||||
{% endif %}
|
||||
</figure>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<picture>
|
||||
{% for width, image_url in page.hero_image_urls.items reversed %}<source srcset="{{ image_url }}" media="(max-width: {{ width }}px)" />{% endfor %}
|
||||
|
||||
<img class="hero" src="{{ page.hero_image_url }}" decoding="async" alt="{{ page.hero_image_alt }}" />
|
||||
<img class="hero" src="{{ page.hero_image_url }}" referrerpolicy="no-referrer" decoding="async" alt="{{ page.hero_image_alt }}" />
|
||||
</picture>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -14,6 +14,6 @@ class UnsplashPhotoChooser(AdminChooser):
|
|||
|
||||
def get_title(self, instance: UnsplashPhoto) -> str:
|
||||
return format_html(
|
||||
"<img src='{}' width=165 loading='lazy' decoding='async'>",
|
||||
"<img src='{}' width=165 loading='lazy' decoding='async' referrerpolicy='no-referrer'>",
|
||||
instance.get_thumbnail_url(),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue