aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/base')
-rw-r--r--templates/web/base/common_scripts.html2
-rw-r--r--templates/web/base/report/_item.html4
-rw-r--r--templates/web/base/report/_item_expandable.html4
3 files changed, 8 insertions, 2 deletions
diff --git a/templates/web/base/common_scripts.html b/templates/web/base/common_scripts.html
index b8c4db343..32ec9b00f 100644
--- a/templates/web/base/common_scripts.html
+++ b/templates/web/base/common_scripts.html
@@ -13,6 +13,7 @@ IF bodyclass.match('frontpage');
scripts.push(
version('/js/front.js'),
version('/js/geolocation.js'),
+ version('/js/loading-attribute-polyfill.js'),
);
ELSIF bodyclass.match('alertpage');
scripts.push(
@@ -64,6 +65,7 @@ IF bodyclass.match('mappage');
version('/cobrands/fixmystreet/map.js'),
version('/vendor/dropzone.min.js'),
version('/vendor/fancybox/jquery.fancybox-1.3.4.pack.js'),
+ version('/js/loading-attribute-polyfill.js'),
);
ELSE;
scripts.push(
diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html
index baba04d3e..6f567de01 100644
--- a/templates/web/base/report/_item.html
+++ b/templates/web/base/report/_item.html
@@ -50,7 +50,9 @@ END;
[% PROCESS 'report/_item_photo_title.html' ~%]
[% CATCH file ~%]
[% IF problem.photo %]
- <img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
+ <noscript class="loading-lazy">
+ <img loading="lazy" class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
+ </noscript>
[% END %]
[% TRY %]
[% PROCESS 'report/_item_heading.html' %]
diff --git a/templates/web/base/report/_item_expandable.html b/templates/web/base/report/_item_expandable.html
index fad935407..ab363482a 100644
--- a/templates/web/base/report/_item_expandable.html
+++ b/templates/web/base/report/_item_expandable.html
@@ -18,7 +18,9 @@
[% IF problem.photo %]
<a href="[% c.cobrand.relative_url_for_report( problem ) %][% problem.url %]" class="item-list__item--expandable__hide-when-expanded">
- <img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
+ <noscript class="loading-lazy">
+ <img loading="lazy" class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
+ </noscript>
</a>
[% END %]