Skip to content

Commit

Permalink
Image size changes (#780)
Browse files Browse the repository at this point in the history
* Image size changes

* undo gif

* more image shrinking

* restore animated gifs
  • Loading branch information
Adam Gordon Bell authored Feb 12, 2024
1 parent 5b2e227 commit 997010d
Show file tree
Hide file tree
Showing 92 changed files with 7 additions and 5 deletions.
Binary file modified blog/assets/images/10-continous-delivery/header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/AWS-IAM/header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/ahmad.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/bukola-omosefunmi.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/donald.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/gineesh-madapparambath.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/ifihanagbara.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/joel-olanwanle.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/joseph-eshiett.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/lukondemwila.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/muhammed.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/nacho.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/reda-dokkar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/sanni-michael.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/somtochukwu.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/authors/soumi-bardhan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/aws-ecs-tutorial/header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/aws-lambda-api-proxy/header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/checklist/header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/chown-permissions-chmod/header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/chroot/6560.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/chroot/header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/containerd-vs-docker/header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/continous-integration-reference/header.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blog/assets/images/cross-compiling-raspberry-pi/header.jpg
Binary file modified blog/assets/images/default-header.jpg
Binary file modified blog/assets/images/default-teaser.jpg
Binary file modified blog/assets/images/devops-glossary/header.jpg
Binary file modified blog/assets/images/docker-slim/header.jpg
Binary file modified blog/assets/images/dont-be-weird/header.jpg
Binary file modified blog/assets/images/dont-be-weird/header.png
Binary file modified blog/assets/images/dont-be-weird/weird.jpg
Binary file modified blog/assets/images/dx-three-ways/header.jpg
Binary file modified blog/assets/images/earthly-open-source/header.jpg
Binary file modified blog/assets/images/future-is-rusty/header.jpg
Binary file modified blog/assets/images/golang-command-line/header.jpg
Binary file modified blog/assets/images/golang-http/header.jpg
Binary file modified blog/assets/images/golang-sqlite/header.jpg
Binary file modified blog/assets/images/golang-streamers/0330.png
Binary file modified blog/assets/images/golang-streamers/1690.png
Binary file modified blog/assets/images/golang-streamers/3850.png
Binary file modified blog/assets/images/golang-streamers/6460.png
Binary file modified blog/assets/images/golang-streamers/header.jpg
Binary file modified blog/assets/images/konfig/img1.png
Binary file modified blog/assets/images/kubernetes-docker/header.jpg
Binary file modified blog/assets/images/kubescape/header.jpg
Binary file modified blog/assets/images/markdown-lint/tools.png
Binary file modified blog/assets/images/migrating-from-travis/trophy.png
Binary file modified blog/assets/images/octopus-deploy/header.jpg
Binary file modified blog/assets/images/one-two-three/header.jpg
Binary file modified blog/assets/images/platform-engineers-mistakes/header.jpg
Binary file modified blog/assets/images/platform-values/header-approachability.jpg
Binary file modified blog/assets/images/platform-values/header-user-respect.jpg
Binary file modified blog/assets/images/platform-values/values-cpp.png
Binary file modified blog/assets/images/poetry-publish/9020.png
Binary file modified blog/assets/images/printf-debugging/5610.png
Binary file modified blog/assets/images/printf-debugging/9200.png
Binary file modified blog/assets/images/programming-language-improvements/header.jpg
Binary file modified blog/assets/images/property-based-testing/header.jpg
Binary file modified blog/assets/images/protobufs-and-grpc/header.jpg
Binary file modified blog/assets/images/python-c-extension/header.jpg
Binary file modified blog/assets/images/python-concatenate-lists/header.jpg
Binary file modified blog/assets/images/python-makefile/header.jpg
Binary file modified blog/assets/images/readability/header.jpg
Binary file modified blog/assets/images/repeatable-builds-every-time/header.jpg
Binary file modified blog/assets/images/ruby-rogues/header.jpg
Binary file modified blog/assets/images/see-state/3260.png
Binary file modified blog/assets/images/see-state/3530.png
Binary file modified blog/assets/images/see-state/3760.png
Binary file modified blog/assets/images/see-state/8050.png
Binary file modified blog/assets/images/showboaters/0240.png
Binary file modified blog/assets/images/showboaters/9840.png
Binary file modified blog/assets/images/shutting-down-earthly-ci/4340.png
Binary file modified blog/assets/images/shutting-down-earthly-ci/4680.png
Binary file modified blog/assets/images/shutting-down-earthly-ci/4880.png
Binary file modified blog/assets/images/shutting-down-earthly-ci/5320.png
Binary file modified blog/assets/images/shutting-down-earthly-ci/5430.png
Binary file modified blog/assets/images/slow-performance-in-jenkins/header.jpg
Binary file modified blog/assets/images/spinnaker-kubernetes/4880.png
Binary file modified blog/assets/images/terraform-depends-on-argument/header.jpg
Binary file modified blog/assets/images/thought-leaders/4-families.png
Binary file modified blog/assets/images/thought-leaders/tools.png
Binary file modified blog/assets/images/unit-vs-integration/header.jpg
Binary file modified blog/assets/images/v0-2-0-released/header.jpg
Binary file modified blog/assets/images/v0-2-2-released/header.jpg
Binary file modified blog/assets/images/yaml-in-python/1Loo6M7.png
Binary file modified blog/assets/images/yaml-validate-and-lint-cue-lang/8210.png
12 changes: 7 additions & 5 deletions util/functions
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ list(){
./util/list.awk "$INIT_LOCATION"
}

revert-file()

## External

post() { # active blog post
Expand Down Expand Up @@ -198,18 +200,18 @@ double-image() { # Double size of image. Using imagemagick
}

jpg-large-images() { # Convert png to jpg for large images
find ./blog/assets/ -type f -size +3200k -print0 | xargs -0 -I {} sips -s format jpeg {}
find ./blog/assets/ -type f -size +2000k -print0 | xargs -0 -I {} sips -s format jpeg {}
}

compress-large-images() { # Find large images and compress them
find ./blog/assets/images -type f -size +3200k | while IFS= read -r file; do
find ./blog/assets/images -type f -size +1900k | while IFS= read -r file; do
if file --mime-type "$file" | grep -q 'image/png'; then
echo "Compressing PNG file: $file"
tmp_file="$(mktemp)"
pngquant --verbose --skip-if-larger --speed 1 --force --quality=85-100 -o "$tmp_file" "$file" && mv "$tmp_file" "$file"
elif file --mime-type "$file" | grep -q 'image/jpeg'; then
echo "Compressing JPEG file: $file"
jpegoptim --max=95 --overwrite "$file"
# elif file --mime-type "$file" | grep -q 'image/jpeg'; then
# echo "Compressing JPEG file: $file"
# jpegoptim --max=95 --overwrite "$file"
fi
done
}
Expand Down

0 comments on commit 997010d

Please sign in to comment.