Add original file extension to filename

Add original file extension to filename

Please, add the original file extension to the file name or add a choise selection (add file extension: y/n).

For example:
logo.png logo.png.webp
logo.jpg logo.jpg.webp

Because now, if there are two images with the same name in the folder (logo.png, logo.jpg), then only one of them is processed (logo.webp).

For quick edit:
File "/djimgtowebp/djimgtowebp.php"
Line 169 (v.1.0)
  1. $newImage = $newImagePath . $imgInfo['filename'] . '.webp';
change to:
  1. $newImage = $newImagePath . $imgInfo['filename'] . '.' . $imgInfo['extension'] . '.webp';