diff options
Diffstat (limited to 'content/posts')
-rw-r--r-- | content/posts/2022-01-28-media-shrinkage.md | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/content/posts/2022-01-28-media-shrinkage.md b/content/posts/2022-01-28-media-shrinkage.md index 3faf119..da13cf8 100644 --- a/content/posts/2022-01-28-media-shrinkage.md +++ b/content/posts/2022-01-28-media-shrinkage.md @@ -23,7 +23,7 @@ tables: - text: "WebP and minified SVGs" size: "324 kB" percent: "45%" - - text: "WebP, minified SVGs, and `mod_deflate` update" + - text: "WebP, minified SVGs, and mod\\_deflate update" size: "**185 kB**" percent: "**68%**" --- @@ -36,11 +36,11 @@ Recently I made the following site improvements: element wrapped in a [`<figure>`][figure]. 5. Updated bitmap images in recent content to default to [WebP][] with a fallback to [PNG][] ([progressive enhancement][]). -6. Configured [`mod_deflate`][mod_deflate] to compress [SVGs][svg] (see +6. Configured [mod\_deflate][mod_deflate] to compress [SVGs][svg] (see note about [BREACH][] below). -**Note:** Using [HTTP compression][] ([`mod_deflate`][mod_deflate], -[`mod_brotli`][mod_brotli], etc) with [dynamic web pages][] can expose +**Note:** Using [HTTP compression][] ([mod\_deflate][mod_deflate], +[mod\_brotli][mod_brotli], etc) with [dynamic web pages][] can expose you to a [BREACH][] attack. This site is [statically generated][] (via [Hugo][]) so [BREACH][] is not an issue. @@ -54,16 +54,17 @@ load in [Chrome][]: ### Notes * The [minify][] command is a thin wrapper around the excellent - [tdewolff/minify library][tdewolff-minify] for [Go][]. + [tdewolff/minify library for Go][tdewolff-minify]. * I also investigated [AVIF][]. Better compression than [WebP][], worse tool and browser support. Will investigate again later. -* Convert [PNG][] to lossless [WebP][] with [Imagemagick][]: +* Convert [PNG][] to lossless [WebP][] with [ImageMagick][]: `convert -quality 100 -define webp:lossless=true src.png dst.png` -* [Apache][] [`mod_deflate`][mod_deflate] config: +* [Apache][] [mod\_deflate][mod_deflate] config: `AddOutputFilterByType image/svg+xml` * [Debian][]: Add `image/webp webp` to `/etc/mime.types`. -**Update (2022-01-29):** Added warning about [BREACH][] and link to +**Update (2022-01-29):** Small formatting, grammar, and spelling fixes. +Added warning about [BREACH][] and link to [tdewolff/minify][tdewolff-minify]. [svg]: https://en.wikipedia.org/wiki/Scalable_Vector_Graphics |