How to add webp support to Bludit

How to add webp support to Bludit

Bludit does not support the modern WebP file format. This means that you simply do not have the opportunity to download it since this format is not in the list of allowed. To fix this, you need to make adjustments to the file /bl-kernel/boot/variables.php lines 109-113 adding a webp there as in the example

// Allowed image extensions
$GLOBALS['ALLOWED_IMG_EXTENSION'] = array('gif', 'png', 'jpg', 'jpeg', 'svg', 'webp');

// Allowed image mime types
$GLOBALS['ALLOWED_IMG_MIMETYPES'] = array('image/gif', 'image/png', 'image/jpeg', 'image/svg+xml', 'image/webp');

If this is not enough, you need to make similar adjustments to the file /bl-kernel/admin/themes/booty/html/media.php line 182

const validImageTypes = ['image/gif', 'image/jpeg', 'image/png', 'image/svg+xml','image/webp'];

And everything will work.

https://www.whitelabeldevelopers.tech/articles/how-to-add-webp-support-to-bludit