Fixed Image Proxy: Some (valid) webp images throw "invalid type" error

Cyberkef

Member
Affected version
2.2.5
I received some complaints that some (valid) webp images were not shown properly.

When using Tools > "Test image proxy", it shows "... could not be fetched or is not a valid image. The specific error message was: Image is an invalid type."
When I open the link directly (or put the domain in the proxy whitelist so they are not processed), the image shows just fine in the browser.

After scrolling through our Image Proxy Log, these are some of the images that are "invalid" (but work if you open them directly or copy/paste in a Discord server):

Looks like they do not pass this Image Proxy either :D
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.7).

Change log:
If using PHP 7.1 or above, allow the image proxy to fetch and store webp images.
There may be a delay before changes are rolled out to the XenForo Community.
 
694


Looks good!

Note that the image proxy only supports webp images if you're running PHP 7.1 or above because we use the IMAGETYPE_WEBP constant to detect which images are valid.
 
Back
Top Bottom