WebP files are usually smaller than the JPEG or PNG they came from, and every current browser opens them. Google’s libwebp package has a small converter for it.
cwebp -q 80 photo.jpg -o photo.webp
cwebp -lossless logo.png -o logo.webp
According to the cwebp documentation, -q sets the compression factor between 0 and 100 and the default is 75. Lower numbers give smaller files with less detail. The input can be PNG, JPEG, TIFF or WebP. The output name goes after -o, and if you leave -o out, cwebp only prints statistics and writes no file at all, which confuses people the first time.
For graphics with sharp edges, such as logos and screenshots, -lossless encodes without any loss. Transparent pixels only keep their hidden colour values when you add -exact.
A resize in the same step works too: -resize 1200 0 sets the width and calculates the height, since the documentation says a 0 for one side keeps the aspect ratio.
To convert a whole folder from the shell:
for f in *.jpg; do cwebp -q 80 "$f" -o "${f%.jpg}.webp"; done
The caveat is that cwebp does not read animated GIF files, and it does not take animated PNG or WebP either. For those you need other tools from the libwebp set. Keep the originals as well, because converting a JPEG to lossy WebP loses a bit of quality again.
Further reading: Google: cwebp documentation