You are not logged in.
Pages: 1
I need a Custom Action which will allow me to convert images to the webp format using cwebp.
This is the command I use to convert images to webp using the command line:
for F in /home/$USER/Pictures/grain/*.jpg ; do cwebp $F -o /home/$USER/Pictures/grain/`basename ${F%.jpg}
`aa%04d.webp ; done
Offline
Try (with test images):
for file in %F; do cwebp "$file" -o "${file%%.*}".webp; done
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks, that works great! Could you add a command to the command that would place the converted files in a subfolder of the working directory?
Offline
This looks like it works:
mkdir %d/webp && cd %d; for file in %N; do cwebp "$file" -o "webp/${file%%.*}".webp; done
...this should create a webp folder as a subfolder and contain the converted files.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Tx, that works great!
Offline
Pages: 1
[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 541.09 KiB (Peak: 544.94 KiB) ]