refactor: reduce the amount of image formats and sizes

Use the least amount of image formats and sizes:

- WebP for images
- Avif with JPEG fallback for pictures
This commit is contained in:
Stefan Imhoff
2023-06-12 20:52:25 +02:00
parent 37e3e8260e
commit 65fe960af0
14 changed files with 33 additions and 19 deletions

View File

@@ -30,10 +30,11 @@ const { entries } = Astro.props;
<img src={data.cover} alt={data.title} />
) : (
<Picture
src={data.cover}
alt={data.title}
aspect={0.6}
breakpoints={[300, 512, 768, 1024]}
breakpoints={[300, 500, 1000]}
format={['avif']}
src={data.cover}
/>
)}
</>