Page 1 of 1
Adding WebP images!
Posted: Fri Mar 27, 2020 9:18 pm
by kolimbursi
Hello! Since I run a Bludit eCommerce store - I am very interested in uploading WebP images to save bandwidth. Is it possible for Bludit to workaround? When I try to upload WebP files it says the file format is unsupported.
Thanks for your help!
Re: Adding WebP images!
Posted: Sat Mar 28, 2020 10:55 am
by kolimbursi
I already added: $GLOBALS['ALLOWED_IMG_EXTENSION'] = array('gif', 'png', 'jpg', 'jpeg', 'svg', 'webp');
But where to place the mime-type image/webp ? I am novice sry
Bludit Version 3.12.0
Re: Adding WebP images!
Posted: Sat Mar 28, 2020 12:33 pm
by kolimbursi
After looking into it - there is much more coding required I think - with image resizing and so on. If there is any way we can add webp support please help!
Re: Adding WebP images!
Posted: Sat Mar 28, 2020 6:14 pm
by Edi
kolimbursi wrote: ↑Sat Mar 28, 2020 10:55 am
I already added: $GLOBALS['ALLOWED_IMG_EXTENSION'] = array('gif', 'png', 'jpg', 'jpeg', 'svg', 'webp');
But where to place the mime-type image/webp ? I am novice sry
The mime-type can be added in the file
media.php in the directory
/bl-kernel/admin/themes/booty/html (lines 181/182):
Code: Select all
// Check file type/extension
const validImageTypes = ['image/gif', 'image/jpeg', 'image/png', 'image/svg+xml','image/webp'];
Re: Adding WebP images!
Posted: Sat Mar 28, 2020 6:19 pm
by Edi
kolimbursi wrote: ↑Sat Mar 28, 2020 12:33 pm
After looking into it - there is much more coding required I think - with image resizing and so on.
What do you mean with "image resizing and so on".
Normally the modification of images is done with a graphics editor.
Re: Adding WebP images!
Posted: Sat Mar 28, 2020 7:21 pm
by kolimbursi
thanks! I will try it out!
Re: Adding WebP images!
Posted: Sat Mar 28, 2020 7:25 pm
by kolimbursi
thank you it works!
It has a slight problem - it doesn't show thumbnails (in the uploader) like the other images but when the image is inserted it shows properly! This way I can save a lot of bandwidth
Re: Adding WebP images!
Posted: Sat Mar 28, 2020 7:48 pm
by Edi
kolimbursi wrote: ↑Sat Mar 28, 2020 7:25 pm
It has a slight problem - it doesn't show thumbnails (in the uploader) like the other images [...]
Perhaps this can be added. You can post a feature request on Github:
https://github.com/bludit/bludit/issues