Skip to content

Commit

Permalink
feat(perf): add loading='lazy' attribute to space/project card images
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasRichel committed May 11, 2021
1 parent b0574f4 commit d2d47df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</div>
<div class="project-card-model-preview__viewport" ref="viewport">
<img
loading="lazy"
:src="image ? image.url : '/static/default-model-preview.png'"
:style="{ transform: `translateX(-${translation}px)` }"
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="space-card-image" :style="{ backgroundColor }">
<img v-if="space.image" :src="space.image" />
<img v-if="space.image" loading="lazy" :src="space.image" />
<svg
v-else
viewBox="-37 -27.5 215 196"
Expand Down

0 comments on commit d2d47df

Please sign in to comment.