While one may have her reasons for storing webp files with another extension than ".webp", it is probably an unusual desire. By adding the requirement that destination file ends with ".webp" will help preventing mistakes. And it will improve security as the library can no longer be used to overwrite important files.
If one wishes to store webp files with another extension, from version 2.2.0 and forward, one will have to rename the file after successful conversion.
While one may have her reasons for storing webp files with another extension than ".webp", it is probably an unusual desire. By adding the requirement that destination file ends with ".webp" will help preventing mistakes. And it will improve security as the library can no longer be used to overwrite important files.
If one wishes to store webp files with another extension, from version 2.2.0 and forward, one will have to rename the file after successful conversion.