📝 Added chris titus opti script and updated rss
This commit is contained in:
parent
9e6a47c4b0
commit
1ab8af44b6
3 changed files with 24 additions and 0 deletions
22
scripts/opti
Executable file
22
scripts/opti
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
# Taken from christitus.com, needs to be remade into more professional script
|
||||
# possibly combine with your own image optimization scripts?
|
||||
# Definitely combine with dependencycheck and your install scripts
|
||||
|
||||
# Dependancies
|
||||
# - img-optimize - https://virtubox.github.io/img-optimize/
|
||||
# - imagemagick
|
||||
# - jpegoptim
|
||||
# - optipng
|
||||
|
||||
FOLDER="/home/titus/github/website/content/images"
|
||||
|
||||
# max width
|
||||
WIDTH=800
|
||||
|
||||
# max height
|
||||
HEIGHT=600
|
||||
|
||||
#resize png or jpg to either height or width, keeps proportions using imagemagick
|
||||
find ${FOLDER} -iname '*.jpg' -o -iname '*.png' -exec convert \{} -verbose -resize $WIDTHx$HEIGHT\> \{} \;
|
||||
img-optimize --std --path ${FOLDER}
|
||||
Loading…
Add table
Add a link
Reference in a new issue