Created
June 24, 2022 17:59
-
-
Save dtroode/7e5ea3e37213270d767f4b1ecc15dcfe to your computer and use it in GitHub Desktop.
Small script to convert screenshots and pictures from my iPhone for my portfolio website.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mogrify -format png (*.heic|*.HEIC) | |
npx @squoosh/cli --mozjpeg '{}' -d squoosh *.png | |
npx @squoosh/cli --resize '{"width": 1000}' --mozjpeg '{}' -s "-1000" -d squoosh/1000 *.png | |
npx @squoosh/cli --resize '{"width": 700}' --mozjpeg '{}' -s "-700" -d squoosh/700 *.png | |
npx @squoosh/cli --avif '{}' -d squoosh *.png | |
npx @squoosh/cli --resize '{"width": 1000}' --avif '{}' -s "-1000" -d squoosh/1000 *.png | |
npx @squoosh/cli --resize '{"width": 700}' --avif '{}' -s "-700" -d squoosh/700 *.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment