From daf7787fb9d096f16c907020d283be3614cf4822 Mon Sep 17 00:00:00 2001 From: Riku Viitanen Date: Wed, 26 Jul 2023 14:37:12 +0300 Subject: [PATCH] image optimisation tips to git.[de,uk] Signed-off-by: Riku Viitanen --- site/git.de.md | 24 ++++++++++++++++++++++++ site/git.uk.md | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/site/git.de.md b/site/git.de.md index eab0673..62863b2 100644 --- a/site/git.de.md +++ b/site/git.de.md @@ -124,6 +124,30 @@ dem `lbwww-img` Repository hinzu, indem Du diese dann jeweils mit diesem Link ve . Wenn dein Patch der Libreboot Webseite hinzugefügt wird, werden erscheinen deine Bilder live. +If adding a photo, compress it for web distribution. Images should be about +800px wide, and usually under 100KiB in size: + +First, scale your image down to approximately 800px width, using your favourite +image manipulation program. For example, with `imagemagick` you can do the +following (make sure the image isn't already smaller or equal than preferred). + + convert original.jpg -resize 600000@ -quality 70% web.jpg + +You should always run `jpegoptim` on jpg images before submitting them. +It strips useless metadata and *losslessly* optimises them further by cleverly +rearranging the huffman tables used in them. + + jpegoptim -s --all-progressive web.jpg + +If the image is a (line) drawing, vector graphics are preferable to bitmaps. +Therefore, if possible, save them as SVGs. Those are easy to modify, +and will surely make translators' work easier as well. + +PNG images should be optimised with `zopfli` (this is lossless as well). +For example, this reduced the Libreboot boot logo from around 11k to 3k: + + zopflipng -ym image.png image.png + Zu Entwicklungszwecken, könntest Du deine Bilder auch lokal verknüpfen, und anschliesend die URLs anpassen sobald Du deine Patches für die Dokumentation/Webseite schickst. diff --git a/site/git.uk.md b/site/git.uk.md index ca03667..4871969 100644 --- a/site/git.uk.md +++ b/site/git.uk.md @@ -114,6 +114,30 @@ Untitled. для кожного з них. Коли його буде поєднано на веб-сайті libreboot, ваші зображення з'являться в реальному часі. +If adding a photo, compress it for web distribution. Images should be about +800px wide, and usually under 100KiB in size: + +First, scale your image down to approximately 800px width, using your favourite +image manipulation program. For example, with `imagemagick` you can do the +following (make sure the image isn't already smaller or equal than preferred). + + convert original.jpg -resize 600000@ -quality 70% web.jpg + +You should always run `jpegoptim` on jpg images before submitting them. +It strips useless metadata and *losslessly* optimises them further by cleverly +rearranging the huffman tables used in them. + + jpegoptim -s --all-progressive web.jpg + +If the image is a (line) drawing, vector graphics are preferable to bitmaps. +Therefore, if possible, save them as SVGs. Those are easy to modify, +and will surely make translators' work easier as well. + +PNG images should be optimised with `zopfli` (this is lossless as well). +For example, this reduced the Libreboot boot logo from around 11k to 3k: + + zopflipng -ym image.png image.png + Для цілей розробки ви можете спочатку створити локальні посилання на зображення, а потім налаштувати URL-адреси, коли надсилатимете документацію/патчі веб-сайту.