rosell-dk / webp-convert

Convert jpeg/png to webp with PHP (if at all possible)
MIT License
581 stars 102 forks source link

Require that destination ends with .webp #220

Closed rosell-dk closed 5 years ago

rosell-dk commented 5 years ago

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.