Last active
May 26, 2021 15:47
-
-
Save owulveryck/6b6c1218a9ca6cee4d0535c2dbfca6ec to your computer and use it in GitHub Desktop.
convert all pictures from the jpg directory into webp
This file contains 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 characters
SOURCE_DIR := jpg | |
OUTPUT_DIR := webp | |
jpg_srcs := $(shell find $(SOURCE_DIR) -type f -name '*.jpg') | |
webp := $(patsubst $(SOURCE_DIR)/%.jpg, $(OUTPUT_DIR)/%.webp, $(jpg_srcs)) | |
toWebo: $(webp) | |
$(OUTPUT_DIR)/%.webp : $(SOURCE_DIR)/%.jpg | |
magick $< -quality 50 -define webp:lossless=true $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment