Add loading="lazy" to some images, except categories in viewport

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-11-04 16:11:36 +01:00
parent a51b36fb75
commit 5078f890ce
3 changed files with 5 additions and 1 deletions

View File

@@ -29,7 +29,7 @@
width="384"
height="384"
alt=""
loading="lazy"
:loading="imageLazy ? 'lazy' : undefined"
/>
</picture>
<p
@@ -71,9 +71,11 @@ withDefaults(
defineProps<{
category: CategoryStatsModel;
withDetails?: boolean;
imageLazy?: boolean;
}>(),
{
withDetails: false,
imageLazy: true,
}
);