Skip to content

Commit

Permalink
Simplify Images (#745)
Browse files Browse the repository at this point in the history
- Only use 192x192px avif avatar images to simplify maintenance (since they lazy loaded at the bottom of the page and don't contribute to FCP/LCP)
- Add smaller favicon.png
- Ignore `.DS_Store` and other annoying files
- Delete non-referenced `safari.png` image
- Lower max-age to 1 week for simplicity so we can easily update existing resources with a reasonable delay
  • Loading branch information
camillobruni authored Apr 2, 2024
1 parent eaf223a commit c9ebbb8
Show file tree
Hide file tree
Showing 225 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ module.exports = (eleventyConfig) => {

// Copy assets that don’t require a build step.
eleventyConfig.addPassthroughCopy('src/favicon.ico');
eleventyConfig.addPassthroughCopy('src/favicon.png');
eleventyConfig.addPassthroughCopy('src/robots.txt');
eleventyConfig.addPassthroughCopy('src/_img');
eleventyConfig.addPassthroughCopy('src/_css/img');
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ dist/
firebase-debug.log
node_modules/
package-lock.json
.DS_Store
Desktop.ini
._*
Thumbs.db
6 changes: 3 additions & 3 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
},
{
"key": "Cache-Control",
"value": "max-age=31557600"
"value": "max-age=604800"
}
]
},
Expand All @@ -124,7 +124,7 @@
"headers": [
{
"key": "Cache-Control",
"value": "max-age=31557600"
"value": "max-age=604800"
}
]
},
Expand All @@ -133,7 +133,7 @@
"headers": [
{
"key": "Cache-Control",
"value": "max-age=31557600"
"value": "max-age=604800"
}
]
}
Expand Down
Binary file removed src/_css/img/safari.png
Binary file not shown.
5 changes: 5 additions & 0 deletions src/_img/avatars/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Avatar Images

This folder contains 192x192px avif files.
You can generate them easily on <https://squoosh.app> using AVIF encoder with
a low quality settings of around 40.
Binary file modified src/_img/avatars/adam-klein.avif
Binary file not shown.
Binary file removed src/_img/avatars/adam-klein.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/addy-osmani.avif
Binary file not shown.
Binary file removed src/_img/avatars/addy-osmani.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/alon-zakai.avif
Binary file not shown.
Binary file removed src/_img/avatars/alon-zakai.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/ana-pesko.avif
Binary file not shown.
Binary file removed src/_img/avatars/ana-pesko.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/andreas-haas.avif
Binary file not shown.
Binary file removed src/_img/avatars/andreas-haas.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/anton-bikineev.avif
Binary file not shown.
Binary file removed src/_img/avatars/anton-bikineev.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/ben-titzer.avif
Binary file not shown.
Binary file removed src/_img/avatars/ben-titzer.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/benedikt-meurer.avif
Binary file not shown.
Binary file removed src/_img/avatars/benedikt-meurer.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/bill-budge.avif
Binary file not shown.
Binary file removed src/_img/avatars/bill-budge.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/camillo-bruni.avif
Binary file not shown.
Binary file removed src/_img/avatars/camillo-bruni.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/clemens-backes.avif
Binary file not shown.
Binary file removed src/_img/avatars/clemens-backes.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/dan-clark.avif
Binary file not shown.
Binary file removed src/_img/avatars/dan-clark.jpg
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file modified src/_img/avatars/dan-elphick.avif
Binary file not shown.
Binary file removed src/_img/avatars/dan-elphick.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/darius-mercadier.avif
Binary file not shown.
Binary file removed src/_img/avatars/darius-mercadier.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/domenic-denicola.avif
Binary file not shown.
Binary file removed src/_img/avatars/domenic-denicola.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/dominik-infuehr.avif
Binary file not shown.
Binary file removed src/_img/avatars/dominik-infuehr.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/frank-tang.avif
Binary file not shown.
Binary file removed src/_img/avatars/frank-tang.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/hannes-payer.avif
Binary file not shown.
Binary file removed src/_img/avatars/hannes-payer.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/igor-sheludko.avif
Binary file not shown.
Binary file removed src/_img/avatars/igor-sheludko.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/ingvar-stepanyan.avif
Binary file not shown.
Binary file removed src/_img/avatars/ingvar-stepanyan.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/jakob-gruber.avif
Binary file not shown.
Binary file removed src/_img/avatars/jakob-gruber.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/jakob-kummerow.avif
Binary file not shown.
Binary file removed src/_img/avatars/jakob-kummerow.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/jaroslav-sevcik.avif
Binary file not shown.
Binary file removed src/_img/avatars/jaroslav-sevcik.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/joyee-cheung.avif
Binary file not shown.
Binary file removed src/_img/avatars/joyee-cheung.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/justin-ridgewell.avif
Binary file not shown.
Binary file removed src/_img/avatars/justin-ridgewell.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/leszek-swirski.avif
Binary file not shown.
Binary file removed src/_img/avatars/leszek-swirski.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/marja-holtta.avif
Binary file not shown.
Binary file removed src/_img/avatars/marja-holtta.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/mark-davis.avif
Binary file not shown.
Binary file removed src/_img/avatars/mark-davis.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/markus-scherer.avif
Binary file not shown.
Binary file removed src/_img/avatars/markus-scherer.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/mathias-bynens.avif
Binary file not shown.
Binary file removed src/_img/avatars/mathias-bynens.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/maya-armyanova.avif
Binary file not shown.
Binary file removed src/_img/avatars/maya-armyanova.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/michael-hablich.avif
Binary file not shown.
Binary file removed src/_img/avatars/michael-hablich.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/michael-lippautz.avif
Binary file not shown.
Binary file removed src/_img/avatars/michael-lippautz.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/michael-stanton.avif
Binary file not shown.
Binary file removed src/_img/avatars/michael-stanton.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/myles-borins.avif
Binary file not shown.
Binary file removed src/_img/avatars/myles-borins.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/mythri-alle.avif
Binary file not shown.
Binary file removed src/_img/avatars/mythri-alle.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/olivier-flueckiger.avif
Binary file not shown.
Binary file removed src/_img/avatars/olivier-flueckiger.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/omer-katz.avif
Binary file not shown.
Binary file removed src/_img/avatars/omer-katz.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/patrick-thier.avif
Binary file not shown.
Binary file removed src/_img/avatars/patrick-thier.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/peter-marshall.avif
Binary file not shown.
Binary file removed src/_img/avatars/peter-marshall.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/rezvan-mahdavi-hezaveh.avif
Binary file not shown.
Binary file removed src/_img/avatars/rezvan-mahdavi-hezaveh.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/ross-mcilroy.avif
Binary file not shown.
Binary file removed src/_img/avatars/ross-mcilroy.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/santiago-aboy-solanes.avif
Binary file not shown.
Binary file removed src/_img/avatars/santiago-aboy-solanes.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/sathya-gunasekaran.avif
Binary file not shown.
Binary file removed src/_img/avatars/sathya-gunasekaran.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/shane-carr.avif
Binary file not shown.
Binary file removed src/_img/avatars/shane-carr.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/shu-yu-guo.avif
Binary file not shown.
Binary file removed src/_img/avatars/shu-yu-guo.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/simon-zuend.avif
Binary file not shown.
Binary file removed src/_img/avatars/simon-zuend.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/stephan-herhut.avif
Binary file not shown.
Binary file removed src/_img/avatars/stephan-herhut.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/toon-verwaest.avif
Binary file not shown.
Binary file removed src/_img/avatars/toon-verwaest.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/ulan-degenbaev.avif
Binary file not shown.
Binary file removed src/_img/avatars/ulan-degenbaev.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/victor-gomes.avif
Binary file not shown.
Binary file removed src/_img/avatars/victor-gomes.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/wouter-van-oortmerssen.avif
Binary file not shown.
Binary file removed src/_img/avatars/wouter-van-oortmerssen.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/yang-guo.avif
Binary file not shown.
Binary file removed src/_img/avatars/yang-guo.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
Binary file modified src/_img/avatars/zeynep-cankara.avif
Binary file not shown.
Binary file removed src/_img/avatars/zeynep-cankara.jpg
Diff not rendered.
Binary file removed src/_img/avatars/[email protected]
Binary file not shown.
Binary file removed src/_img/avatars/[email protected]
Diff not rendered.
1 change: 1 addition & 0 deletions src/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
{% if '/features' in page.url %}
<link rel="stylesheet" href="/_css/feature-support.css">
{% endif %}
<link rel="icon" href="/favicon.png" sizes="48x48">
<link rel="manifest" href="/.webmanifest">
<meta name="theme-color" content="#4285F4">
<link rel="alternate" href="{{ metadata.feed.path | url }}" type="application/atom+xml" title="V8 Atom feed">
Expand Down
5 changes: 1 addition & 4 deletions src/_includes/layouts/feature.njk
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ layout: layouts/base.njk
<div>
{% if avatars %}
{% for avatar in avatars %}
<picture>
<source srcset="/_img/avatars/{{ avatar }}.avif, /_img/avatars/{{ avatar }}@2x.avif 2x" type="image/avif"></source>
<img src="/_img/avatars/{{ avatar }}.jpg" srcset="/_img/avatars/{{ avatar }}@2x.jpg 2x" alt="" width="96" height="96" loading="lazy">
</picture>
<img src="/_img/avatars/{{ avatar }}.avif" alt="" width="96" height="96" loading="lazy">
{% endfor %}
{% endif %}
<p>Posted by {{ author | markdown | safe }}.</p>
Expand Down
5 changes: 1 addition & 4 deletions src/_includes/layouts/post.njk
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ layout: layouts/base.njk
<div>
{% if avatars %}
{% for avatar in avatars %}
<picture>
<source srcset="/_img/avatars/{{ avatar }}.avif, /_img/avatars/{{ avatar }}@2x.avif 2x" type="image/avif"></source>
<img src="/_img/avatars/{{ avatar }}.jpg" srcset="/_img/avatars/{{ avatar }}@2x.jpg 2x" alt="" width="96" height="96" loading="lazy">
</picture>
<img src="/_img/avatars/{{ avatar }}.avif" alt="" width="96" height="96" loading="lazy">
{% endfor %}
{% endif %}
<p
Expand Down
Binary file added src/favicon.png

0 comments on commit c9ebbb8

Please sign in to comment.