www: use next gen image formats for illustration (#170)

This commit is contained in:
Luca Casonato
2022-04-24 13:40:15 +02:00
committed by GitHub
parent 77bfd4b244
commit 0e6a24202d
8 changed files with 22 additions and 7 deletions
+22 -7
View File
@@ -77,13 +77,28 @@ function Intro() {
<section
class={tw`max-w-screen-sm mx-auto my-16 px(4 sm:6 md:8) space-y-4`}
>
<img
src={asset("/illust.jpeg")}
class={tw`w-64 mx-auto`}
width={256}
height={217}
alt="deno is drinking fresh lemon squash"
/>
<picture>
<source
srcset={`${asset("/illustration/2x.avif")} 2x, ${
asset("/illustration/1x.avif")
}`}
type="image/avif"
/>
<source
srcset={`${asset("/illustration/2x.webp")} 2x, ${
asset("/illustration/1x.webp")
}`}
type="image/webp"
/>
<img
src={asset("/illustration/1x.jpeg")}
srcset={`${asset("/illustration/2x.jpeg")} 2x`}
class={tw`w-64 mx-auto`}
width={800}
height={678}
alt="deno is drinking fresh lemon squash"
/>
</picture>
<h2 class={title}>
The next-gen web framework.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB