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
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- 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.
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Tx, that works great!
Offline
Pages: 1
[ Generated in 0.013 seconds, 12 queries executed - Memory usage: 529.45 KiB (Peak: 530.73 KiB) ]