Forked from julianxhokaxhiu/pagespeed_optimize_images.sh
Created
February 25, 2022 23:57
-
-
Save joelhooks/b951aad3459d579de9598640b86e2bb5 to your computer and use it in GitHub Desktop.
Revisions
-
joelhooks revised this gist
Feb 25, 2022 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ #!/bin/bash # https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873 # Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 # brew install optipng pngcrush jpegoptim find . -type f -iname "*.png" -exec optipng -nb -nc {} \; find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \; -
julianxhokaxhiu revised this gist
Mar 26, 2020 . 1 changed file with 4 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,6 @@ #!/bin/bash # Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 find . -type f -iname "*.png" -exec optipng -nb -nc {} \; find . -type f -iname "*.png" -exec advpng -z4 {} \; find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \; -
julianxhokaxhiu revised this gist
Mar 26, 2020 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/bin/bash # Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 find . -type f \( -iname "*.png" -o -iname "*.PNG" \) -exec optipng -nb -nc {} \; find . -type f \( -iname "*.png" -o -iname "*.PNG" \) -exec advpng -z4 {} \; find . -type f \( -iname "*.png" -o -iname "*.PNG" \) -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; find . -type f \( -iname "*.jpg" -o -iname "*.JPG" \) -exec jpegoptim -f --strip-all {} \; find . -type f \( -iname "*.jpeg" -o -iname "*.JPEG" \) -exec jpegoptim -f --strip-all {} \; -
julianxhokaxhiu revised this gist
Mar 1, 2020 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/bin/bash # Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 find . -type f -name "*.png" -o -name "*.PNG" -exec optipng -nb -nc {} \; find . -type f -name "*.png" -o -name "*.PNG" -exec advpng -z4 {} \; find . -type f -name "*.png" -o -name "*.PNG" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; find . -type f -name "*.jpg" -o -name "*.JPG" -exec jpegoptim -f --strip-all {} \; find . -type f -name "*.jpeg" -o -name "*.JPEG" -exec jpegoptim -f --strip-all {} \; -
julianxhokaxhiu revised this gist
Mar 1, 2020 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #!/bin/bash # Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 find . -type f -name "*.png" -o -name "*.PNG" -print0 -exec optipng -nb -nc {} \; find . -type f -name "*.png" -o -name "*.PNG" -print0 -exec advpng -z4 {} \; find . -type f -name "*.png" -o -name "*.PNG" -print0 -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; find . -type f -name "*.jpg" -o -name "*.JPG" -print0 -exec jpegoptim -f --strip-all {} \; find . -type f -name "*.jpeg" -o -name "*.JPEG" -print0 -exec jpegoptim -f --strip-all {} \; -
julianxhokaxhiu revised this gist
Nov 18, 2019 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ #!/bin/bash # Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 find . -type f -name "*.png" -o -name "*.PNG" -print0 | xargs -0 -I {} optipng -nb -nc "{}" find . -type f -name "*.png" -o -name "*.PNG" -print0 | xargs -0 -I {} advpng -z4 "{}" find . -type f -name "*.png" -o -name "*.PNG" -print0 | xargs -0 -I {} pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow "{}" find . -type f -name "*.jpg" -o -name "*.JPG" -print0 | xargs -0 -I {} jpegoptim -f --strip-all "{}" find . -type f -name "*.jpeg" -o -name "*.JPEG" -print0 | xargs -0 -I {} jpegoptim -f --strip-all "{}" -
julianxhokaxhiu revised this gist
Dec 17, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ #!/bin/bash find . -type f -name "*.png" -o -name "*.PNG" | xargs optipng -nb -nc find . -type f -name "*.png" -o -name "*.PNG" | xargs advpng -z4 find . -type f -name "*.png" -o -name "*.PNG" | xargs pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow find . -type f -name "*.jpg" -o -name "*.JPG" | xargs jpegoptim -f --strip-all -
julianxhokaxhiu revised this gist
Dec 17, 2015 . No changes.There are no files selected for viewing
-
julianxhokaxhiu revised this gist
Dec 17, 2015 . 1 changed file with 3 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,4 @@ #!/bin/bash find . -type f -name "*.png" -o -name "*.PNG" | xargs optipng -nb -nc find . -type f -name "*.png" -o -name "*.PNG" | xargs pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow find . -type f -name "*.jpg" -o -name "*.JPG" | xargs jpegoptim -f --strip-all -
julianxhokaxhiu revised this gist
Dec 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,6 @@ find . -type f -name "*.png" | xargs optipng -nb -nc find . -type f -name "*.png" | xargs pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow find . -type f -name "*.PNG" | xargs optipng -nb -nc find . -type f -name "*.PNG" | xargs pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow find . -type f -name "*.jpg" | xargs jpegoptim -f --strip-all find . -type f -name "*.JPG" | xargs jpegoptim -f --strip-all -
julianxhokaxhiu revised this gist
Dec 17, 2015 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ #!/bin/bash find . -type f -name "*.png" | xargs optipng -nb -nc find . -type f -name "*.png" | xargs pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow find . -type f -name "*.PNG" | xargs optipng -nb -nc find . -type f -name "*.png" | xargs pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow find . -type f -name "*.jpg" | xargs jpegoptim -f --strip-all find . -type f -name "*.JPG" | xargs jpegoptim -f --strip-all -
julianxhokaxhiu revised this gist
Dec 16, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/bash find . -type f -name "*.png" | xargs optipng -nb -nc find . -type f -name "*.PNG" | xargs optipng -nb -nc find . -type f -name "*.jpg" | xargs jpegoptim --strip-all find . -type f -name "*.JPG" | xargs jpegoptim --strip-all -
julianxhokaxhiu revised this gist
Dec 16, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/bash find . -type f -name "*.png" | xargs optipng -nb -nc find . -type f -name "*.PNG" | xargs optipng -nb -nc find . -type f -name "*.jpg" | xargs jpegoptim --strip-all {} \; find . -type f -name "*.JPG" | xargs jpegoptim --strip-all {} \; -
julianxhokaxhiu revised this gist
Dec 16, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/bash find . -type f -name "*.png" | xargs optipng -nx find . -type f -name "*.PNG" | xargs optipng -nx find . -type f -name "*.jpg" | xargs jpegoptim --strip-all {} \; find . -type f -name "*.JPG" | xargs jpegoptim --strip-all {} \; -
julianxhokaxhiu revised this gist
Dec 16, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/bash find . -name "*.png" | xargs optipng -nx find . -name "*.PNG" | xargs optipng -nx find -type f -name "*.jpg" -exec jpegoptim --strip-all {} \; find -type f -name "*.JPG" -exec jpegoptim --strip-all {} \; -
julianxhokaxhiu revised this gist
Dec 16, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/bin/bash find . -name "*.png" | xargs optipng -nc -nb find . -name "*.PNG" | xargs optipng -nc -nb find -type f -name "*.jpg" -exec jpegoptim --strip-all {} \; find -type f -name "*.JPG" -exec jpegoptim --strip-all {} \; -
julianxhokaxhiu revised this gist
Dec 16, 2015 . No changes.There are no files selected for viewing
-
julianxhokaxhiu created this gist
Dec 16, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ #!/bin/bash find . -name "*.png" | xargs optipng -nc -nb -o7 -full find . -name "*.PNG" | xargs optipng -nc -nb -o7 -full find -type f -name "*.jpg" -exec jpegoptim --strip-all {} \; find -type f -name "*.JPG" -exec jpegoptim --strip-all {} \;