further optimize static images
5
.github/workflows/gh-pages.yml
vendored
@ -34,13 +34,16 @@ jobs:
|
|||||||
# Put a bow on top of Hugo's automatic image processing by using
|
# Put a bow on top of Hugo's automatic image processing by using
|
||||||
# pngquant and jpegoptim to optimize/compress images in posts,
|
# pngquant and jpegoptim to optimize/compress images in posts,
|
||||||
# just a little lossily (is that a word?)
|
# just a little lossily (is that a word?)
|
||||||
|
#
|
||||||
|
# TODO: Find a way to cache the results, this takes about 4 minutes
|
||||||
|
# each build -- not ideal. Maybe use @sindresorhus/imagemin.
|
||||||
- name: Optimize processed images
|
- name: Optimize processed images
|
||||||
run: |
|
run: |
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends jpegoptim pngquant optipng
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends jpegoptim pngquant optipng
|
||||||
cd $HOME/gh-pages/notes
|
cd $HOME/gh-pages/notes
|
||||||
find . -iname "*.jp*" -print0 | xargs -0 jpegoptim --max=80 --strip-all
|
find . -iname "*.jp*" -print0 | xargs -0 jpegoptim --max=80 --strip-all
|
||||||
find . -iname "*.png" -print0 | xargs -0 pngquant --quality=50-70 --speed 3 --ext=.png --force
|
find . -iname "*.png" -print0 | xargs -0 pngquant --quality=50-70 --speed 3 --ext=.png --force
|
||||||
find . -iname "*.png" -print0 | xargs -0 optipng -o2 -force -strip all -quiet --
|
find . -iname "*.png" -print0 | xargs -0 optipng -o3 -force -strip all -quiet --
|
||||||
# Ignore errors - override pipefail
|
# Ignore errors - override pipefail
|
||||||
shell: bash {0}
|
shell: bash {0}
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 74 KiB |
BIN
content/me.jpg
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 299 B |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 394 B After Width: | Height: | Size: 393 B |
Before Width: | Height: | Size: 527 B After Width: | Height: | Size: 515 B |
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 942 B After Width: | Height: | Size: 734 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |