imagify-plugin
imagify-plugin copied to clipboard
Image name stripped from WebP file if contains non-latin characters
When converting images to WebP, there is a problem with the main image WebP version if image name starts with non-latin characters.
For example, image name is Прием-първи-клас-2оу.png
.
Once you optimize it, WebP of the original image will be renamed to -първи-клас-2оу.png
while thumbnails' WebP files will be generated properly.
So, it strips all non-latin letters until gets to the first standard character (more precise to say UTF-8 perhaps).
To Reproduce
- Upload one of attached files to your WP installation
- Optimize it (make sure WebP option is active)
- Open the original image in new tab
- append
.webp
to that URL to see if WebP exists - you should get 404 page - remove the first part of non-latin characters from URL and check if WebP is there - you will see WebP
Example of the correct URL for the second attached image (where WebP is visible) will be ...wp-content/uploads/2022/07/HisenseQ5.png.webp
Expected behavior
WebP should keep the same name of the image