image_resize() treats all resized images resulting in JPEG as having the .jpg extension
|Reported by:||kawauso||Owned by:||nacin|
|Component:||Filesystem API||Keywords:||has-patch commit|
Steps to reproduce:
- Upload foobar.jpg
- Upload foobar.jpeg
- WordPress will use foobar-200x200.jpg and such for the intermediate sizes of the second image
wp_handle_upload() uses image_resize() which attempts to convert all images except GIFs/PNGs to JPEG and hardcodes the .jpg extension. This may well affect all image types handled by GD aside from GIF/PNG when WordPress is given the correct settings to handle them.
The real issue for me is that if the resize procedure fails, it does so silently and just passes back the URL for an existing file matching the output filename.