1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 18:50:29 -04:00

further optimize static images

This commit is contained in:
Jake Jarvis 2019-11-09 11:54:11 -05:00
parent 32e1aa8098
commit 891beef4bd
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
14 changed files with 4 additions and 1 deletions

View File

@ -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}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 B

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 631 B

After

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 942 B

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB