Skip to content

Commit 5bf1530

Browse files
committed
fix: ファーストビューに表示されない画像をloading="lazy"に修正"
1 parent 4866ac9 commit 5bf1530

File tree

12 files changed

+38
-14
lines changed

12 files changed

+38
-14
lines changed

apps/web/app/components/AccessPageSection.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ const { color } = useColor()
6363
</div>
6464

6565
<figure class="place_image">
66-
<img src="/access/fig_access01.jpg" alt="" />
67-
<img src="/access/fig_access02.jpg" alt="" />
66+
<img src="/access/fig_access01.jpg" alt="" loading="lazy" />
67+
<img src="/access/fig_access02.jpg" alt="" loading="lazy" />
6868
</figure>
6969

7070
</div>

apps/web/app/components/CooperationPartnerSection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<source srcset="/logo/logo_vueconf-de.png" media="(min-width: 768px)" />
1111
<img
1212
src="/logo/logo_vueconf-de_sp.png"
13-
loading="lazy"
1413
alt="vuejs.de"
1514
class="partner-image"
15+
loading="lazy"
1616
/>
1717
</picture>
1818
</NuxtLink>

apps/web/app/components/event/EventAsset.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ const props = defineProps<EventAssetProps>()
1010
</script>
1111

1212
<template>
13-
<img :src="`/event/${title}.png`" alt="" class="eventcard-image" :style="{ marginTop: `${marginTop}px` }" />
13+
<img
14+
:src="`/event/${title}.png`"
15+
alt=""
16+
class="eventcard-image"
17+
:style="{ marginTop: `${marginTop}px` }"
18+
loading="lazy"
19+
/>
1420
</template>
1521

1622
<style scoped>

apps/web/app/components/event/EventMultipleAssets.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ const props = defineProps<EventMultipleAssetsProps>()
1616
'--head-img-height': `${imgHeight}px`,
1717
}"
1818
>
19-
<img v-for="(title, key) in titleList" :key :src="`/event/${title}-${key + 1}.png`" alt="" />
19+
<img
20+
v-for="(title, key) in titleList"
21+
:key
22+
:src="`/event/${title}-${key + 1}.png`"
23+
alt=""
24+
loading="lazy"
25+
/>
2026
</div>
2127
</template>
2228

apps/web/app/components/sponsor/SponsorList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const currentLocale = useLocaleCurrent().locale
2222
class="sponsor-list-item-link"
2323
:to="`${currentLocale === 'ja' ? '/' : `/${currentLocale}/`}sponsors/${item['detail_page_id']}`"
2424
>
25-
<img class="sponsor-list-item-image" :src="item['image_url']" :alt="item.name" />
25+
<img class="sponsor-list-item-image" :src="item['image_url']" :alt="item.name" loading="lazy" />
2626
</NuxtLink>
2727
</li>
2828
</ul>

apps/web/app/components/ticket/NamecardSection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const { locale: currentLocale } = useLocaleCurrent()
2424
</div>
2525

2626
<div class="content-wrapper">
27-
<img :src="'/namecard/namecard-samples.png'" alt="test" />
27+
<img :src="'/namecard/namecard-samples.png'" alt="test" loading="lazy" />
2828
<div class="buttons-wrapper">
2929
<VFLinkButton
3030
class="action-button"

apps/web/app/components/ticket/PersonalSponsorSection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { ticketUrl } from '~/utils/constants'
1616
:detail="$t(`personal_sponsor.merit${i}.detail`)"
1717
:caution="(i === 2 || i === 4) ? $t(`personal_sponsor.merit${i}.caution`) : ''"
1818
>
19-
<img alt="" :src="`/sponsor/merit-${i}.jpg`" />
19+
<img alt="" :src="`/sponsor/merit-${i}.jpg`" loading="lazy" />
2020
</VFMeritCard>
2121
</div>
2222
<div class="personal-sponsor-text">

apps/web/app/pages/sessions/[id]/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ useHead({
7373
:name="currentLocale === 'en' ? speakerData[0].name_en : speakerData[0].name_ja"
7474
:github-id="speakerData[0].github_id"
7575
:x-id="speakerData[0].x_id"
76+
loading="eager"
7677
/>
7778
<div class="person-info">
7879
{{ currentLocale === 'ja' ? speakerData[0].description_ja : speakerData[0].description_en }}

packages/ui/components/speaker/Avatar.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
type AvatarProps = {
33
src: string
44
alt: string
5+
loading?: 'lazy' | 'eager'
56
}
6-
7-
defineProps<AvatarProps>()
7+
withDefaults(defineProps<AvatarProps>(), {
8+
loading: 'lazy',
9+
})
810
</script>
911
1012
<template>
11-
<img :src="src" :alt="alt" />
13+
<img :src="src" :alt="alt" :loading="loading" />
1214
</template>
1315
1416
<style scoped>

packages/ui/components/speaker/Speaker.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,24 @@ type SpeakerProps = {
1111
githubId?: string
1212
xId?: string
1313
rowPosition?: boolean
14+
loading?: 'lazy' | 'eager'
1415
}
1516
16-
defineProps<SpeakerProps>()
17+
withDefaults(defineProps<SpeakerProps>(), {
18+
company: '',
19+
division: '',
20+
githubId: '',
21+
xId: '',
22+
rowPosition: false,
23+
loading: 'lazy',
24+
})
1725
1826
const { color } = useColor()
1927
</script>
2028

2129
<template>
2230
<div class="speaker-wrapper" :style="rowPosition ? '' : 'flex-direction: column;'">
23-
<Avatar :src="image" :alt="name" />
31+
<Avatar :src="image" :alt="name" :loading="loading" />
2432
<div class="speaker-info">
2533
<div class="speaker-affiliation">
2634
<p

0 commit comments

Comments
 (0)