mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-03 20:15:27 +00:00
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:
@@ -26,7 +26,13 @@ const imageClasses =
|
||||
src.includes('.svg') ? (
|
||||
<img class={imageClasses} src={src} {...(props as any)} />
|
||||
) : (
|
||||
<Img src={src} attributes={{ class: imageClasses }} {...props} />
|
||||
<Img
|
||||
attributes={{ class: imageClasses }}
|
||||
breakpoints={[500, 1000, 1500]}
|
||||
format="webp"
|
||||
src={src}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user