Skip to content

Instantly share code, notes, and snippets.

@selimhex
Last active March 16, 2022 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selimhex/3cdc715a1c0d5fbfd7bc4e3e1b90119e to your computer and use it in GitHub Desktop.
Save selimhex/3cdc715a1c0d5fbfd7bc4e3e1b90119e to your computer and use it in GitHub Desktop.
encode / decode directory of webp files
# https://developers.google.com/speed/webp/faq#how_can_i_convert_my_personal_images_files_to_webp
# convert all jpeg files in a directory
for F in *.jpg; do cwebp $F -o `basename ${F%.jpg}`.webp; done
# decode all webp files in a directory to png
for F in *.webp; do dwebp $F -o `basename ${F%.webp}`.png; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment