Skip to content

Commit

Permalink
added preloading to some images to reduce the CLS
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm authored Apr 11, 2024
1 parent a910695 commit 4491d24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webclient/components/DetailsInfoSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const runtimeConfig = useRuntimeConfig();
:alt="t('image_alt')"
:src="`${runtimeConfig.public.cdnURL}/cdn/lg/${shownImage.name}`"
class="bg-zinc-100 block h-auto w-full max-w-full rounded-t-lg"
preload
placeholder
/>
</button>
<div class="px-5 py-3">
Expand Down
1 change: 1 addition & 0 deletions webclient/pages/[view]/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ onMounted(() => {
:src="`${runtimeConfig.public.cdnURL}/cdn/lg/${data.imgs[0].name}`"
densities="x1 x2 x3 x4"
class="block w-full"
preload
placeholder
/>
</button>
Expand Down

0 comments on commit 4491d24

Please sign in to comment.