I was wondering about the following;
I use the following command to find .jpg files in (sub)directorys and convert (mogrify) them to .webp files.
find . -name '*.jpg' -execdir mogrify -format webp {} \;
In this case: file.jpg becomes file.webp (and .jpg is kept).
What I want is:
Example: file.jpg becomes file.jpg.webp (and .jpg is kept).
- How can I modify my code that it will set .jpg.webp?
- Is there a code that checks if a file is already converted so it will pass, UNLESS the original .jpg file is newer?
Thanks in advance!