Merge pull request #1924 from thelounge/xpaw/img-decoding

Set decoding=async on image previews
This commit is contained in:
Jérémie Astori 2018-01-30 00:22:22 -05:00 committed by GitHub
commit 8d124dd2a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@
{{/if}} {{/if}}
<a class="image-link" href="{{link}}" target="_blank"> <a class="image-link" href="{{link}}" target="_blank">
<img src="{{image}}" alt="Preview of {{link}}"> <img src="{{image}}" decoding="async" alt="">
</a> </a>
<a class="btn open-btn" href="{{link}}" target="_blank"> <a class="btn open-btn" href="{{link}}" target="_blank">

View File

@ -2,7 +2,7 @@
<div class="toggle-content toggle-type-{{type}}{{#if shown}} show{{/if}}"> <div class="toggle-content toggle-type-{{type}}{{#if shown}} show{{/if}}">
{{#equal type "image"}} {{#equal type "image"}}
<a class="toggle-thumbnail" href="{{link}}" target="_blank" rel="noopener"> <a class="toggle-thumbnail" href="{{link}}" target="_blank" rel="noopener">
<img src="{{thumb}}"> <img src="{{thumb}}" decoding="async" alt="">
</a> </a>
{{/equal}} {{/equal}}
{{#equal type "audio"}} {{#equal type "audio"}}
@ -20,7 +20,7 @@
{{#equal type "link"}} {{#equal type "link"}}
{{#if thumb}} {{#if thumb}}
<a class="toggle-thumbnail" href="{{link}}" target="_blank" rel="noopener"> <a class="toggle-thumbnail" href="{{link}}" target="_blank" rel="noopener">
<img src="{{thumb}}" class="thumb"> <img src="{{thumb}}" decoding="async" alt="" class="thumb">
</a> </a>
{{/if}} {{/if}}
<a class="toggle-text" href="{{link}}" target="_blank" rel="noopener"> <a class="toggle-text" href="{{link}}" target="_blank" rel="noopener">