feat: update hero image and remove lazy for img tag

This commit is contained in:
kaivanwong 2024-05-16 16:00:18 +08:00
parent 558923909d
commit c4d0b530f8
6 changed files with 4 additions and 25 deletions

BIN
public/hero.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View file

@ -27,14 +27,7 @@ const { Content } = await page.render()
{ {
image && ( image && (
<p> <p>
<img <img width="640" height="360" src={image.src} alt={image.alt || ''} />
width="100%"
height="auto"
src={image.src}
loading="lazy"
decoding="async"
alt={image.alt || ''}
/>
</p> </p>
) )
} }

View file

@ -12,14 +12,7 @@ import siteConfig from '@/site-config'
by <a target="_blank" href="https://antfu.me">antfu.me</a>. by <a target="_blank" href="https://antfu.me">antfu.me</a>.
</p> </p>
<p> <p>
<img <img width="640" height="360" src="/hero.jpg" alt="Hero Image" />
width="100%"
height="auto"
src="/hero.webp"
loading="lazy"
decoding="async"
alt="Hero Image"
/>
</p> </p>
<p> <p>
Based on first principles thinking, and you can also see from the picture Based on first principles thinking, and you can also see from the picture

View file

@ -38,14 +38,7 @@ function getDate(date: string) {
{ {
image && ( image && (
<p> <p>
<img <img width="640" height="360" src={image.src} alt={image.alt || ''} />
width="100%"
height="auto"
src={image.src}
loading="lazy"
decoding="async"
alt={image.alt || ''}
/>
</p> </p>
) )
} }

View file

@ -4,7 +4,7 @@ export const siteConfig = {
subtitle: 'Vitesse theme for Astro, supports Vue and UnoCSS.', subtitle: 'Vitesse theme for Astro, supports Vue and UnoCSS.',
description: 'A Minimal, SEO-friendly portfolio and blog theme for Astro.', description: 'A Minimal, SEO-friendly portfolio and blog theme for Astro.',
image: { image: {
src: '/hero.webp', src: '/hero.jpg',
alt: 'Website Main Image', alt: 'Website Main Image',
}, },
email: 'kaivanwong@outlook.com', email: 'kaivanwong@outlook.com',