website icon indicating copy to clipboard operation
website copied to clipboard

script-for-optimizing-images/

Open utterances-bot opened this issue 3 years ago • 3 comments

Script for Optimizing Images

Having Fun with Technology

https://christitus.com/script-for-optimizing-images/

utterances-bot avatar Jan 30 '23 19:01 utterances-bot

wow this is very cool

iljo-dp avatar Jan 30 '23 19:01 iljo-dp

Why don't you use Hugo's build in resize with. You can resize the image, change it to webp and you can create multiple images to use in a scrset.

dpater1986 avatar Jan 30 '23 19:01 dpater1986

Optimize Everywhere

I have made so that you don't need to get into the folder in order to optimize the images instead you could do it wherever you are. This was done on Arch Linux.

All-in-One Install Command

sudo pacman -Syu git && git clone https://aur.archlinux.org/yay-bin && cd yay-bin && makepkg -si && sudo pacman -U yay-bin-11.3.2-1-x86_64.pkg.tar.zst && yay -S jpegoptim optipng imagemagick libwebp -y && git clone https://github.com/VirtuBox/img-optimize.git $HOME/.img-optimize && sudo ln -s $HOME/.img-optimize/optimize.sh /usr/local/bin/img-optimize && sudo chmod +x /usr/local/bin/img-optimize && echo "
#Image Optimization
alias optimize='~/.img-optimize/optimize.sh'
" >> ~/.bashrc && source ~/.bashrc

raminsamadi123 avatar Feb 02 '23 14:02 raminsamadi123