Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
444 B

  1. #!/bin/bash
  2. WIDTH="690>"
  3. files=("./entries" "./img")
  4. for folder in "${files[@]}"; do
  5. for f in $(find $folder -name '*.jpg' -or -name '*.JPG'); do
  6. convert "$f" -resize $WIDTH "$f"
  7. jpegoptim --max=80 --strip-all --preserve --totals --all-progressive "$f"
  8. done
  9. for f in $(find $folder -name '*.png' -or -name '*.PNG'); do
  10. convert "$f" -resize $WIDTH "$f"
  11. optipng -o7 -preserve "$f"
  12. done
  13. done