serve images in next-gen format for better performance

Signed-off-by: reveurguy <59417546+reveurguy@users.noreply.github.com>
This commit is contained in:
reveurguy 2022-08-17 00:23:40 +05:30
parent 74ade371a5
commit ed9b2b2f98
5 changed files with 3 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
/_site /_site
/vendor /vendor
/node_modules /node_modules
.DS_Store
docs/.DS_Store

BIN
images/hero.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

BIN
images/hero@2x.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

BIN
images/hero@3x.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 KiB

View File

@ -29,7 +29,7 @@ stylesheet: index
</div> </div>
<div class="col-7_md-12_md-first hero"> <div class="col-7_md-12_md-first hero">
<div> <div>
<img class="img" src="{{ "/images/hero.png" | relative_url }}" srcset="{{ "/images/hero.png" | relative_url }} 1x, {{ "/images/hero@2x.png" | relative_url }} 2x, {{ "/images/hero@3x.png" | relative_url }} 3x" alt="Crossplane hero image" /> <img class="img" src="{{ "/images/hero.webp" | relative_url }}" srcset="{{ "/images/hero.webp" | relative_url }} 1x, {{ "/images/hero@2x.webp" | relative_url }} 2x, {{ "/images/hero@3x.webp" | relative_url }} 3x" alt="Crossplane hero image" />
</div> </div>
</div> </div>
</div> </div>