2021-12-08, 07:47 PM
If I add an attachment type for webp, identify its MIME type as image/webp, it is uploaded as an attachment with a link which can open into a new tab.
The attachment is a type which will not generate a thumbnail, and is not supported as an image in a similar fashion as .png, .jpg, and .gif files.
Searching forum threads for "webp" gives me a short list and incomplete information as to potential solution.
Modern browsers can render the webp format directly.
In this thread, the OP describes a problem as unable to upload the type, and it was apparently fixed with php 7.2 upgrade.
https://community.mybb.com/thread-215871...light=webp
The last post asks the same question as I am, and there were were no further replies then.
In this thread, crazycat shows the image type is hard coded, but there is likely more work to be done.
https://community.mybb.com/thread-228933...light=webp
In inc/functions_image.php, A thumbnail can only be created if imagetype is .gif, .jpg, or .png.
These are using native PHP functions, and there is a native PHP function @createimagefromwebp() although not implemented in MyBB core.
Has anyone added custom code to support webp format in a similar fashion as currently supplied for jpg?
The attachment is a type which will not generate a thumbnail, and is not supported as an image in a similar fashion as .png, .jpg, and .gif files.
Searching forum threads for "webp" gives me a short list and incomplete information as to potential solution.
Modern browsers can render the webp format directly.
In this thread, the OP describes a problem as unable to upload the type, and it was apparently fixed with php 7.2 upgrade.
https://community.mybb.com/thread-215871...light=webp
The last post asks the same question as I am, and there were were no further replies then.
In this thread, crazycat shows the image type is hard coded, but there is likely more work to be done.
https://community.mybb.com/thread-228933...light=webp
In inc/functions_image.php, A thumbnail can only be created if imagetype is .gif, .jpg, or .png.
These are using native PHP functions, and there is a native PHP function @createimagefromwebp() although not implemented in MyBB core.
Has anyone added custom code to support webp format in a similar fashion as currently supplied for jpg?