Open utterances-bot opened 1 year ago
wow this is very cool
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.
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.
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
Script for Optimizing Images
Having Fun with Technology
https://christitus.com/script-for-optimizing-images/