Adding WebP images!
-
- Ssr. Bludit
- Posts: 24
- Joined: Tue Feb 11, 2020 10:00 am
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!
Thanks for your help!
-
- Ssr. Bludit
- Posts: 24
- Joined: Tue Feb 11, 2020 10:00 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
Bludit Version 3.12.0
But where to place the mime-type image/webp ? I am novice sry
Bludit Version 3.12.0
-
- Ssr. Bludit
- Posts: 24
- Joined: Tue Feb 11, 2020 10:00 am
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!
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
The mime-type can be added in the file media.php in the directory /bl-kernel/admin/themes/booty/html (lines 181/182):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
Code: Select all
// Check file type/extension
const validImageTypes = ['image/gif', 'image/jpeg', 'image/png', 'image/svg+xml','image/webp'];
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
What do you mean with "image resizing and so on".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.
Normally the modification of images is done with a graphics editor.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
-
- Ssr. Bludit
- Posts: 24
- Joined: Tue Feb 11, 2020 10:00 am
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
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
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
Perhaps this can be added. You can post a feature request on Github: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 [...]
https://github.com/bludit/bludit/issues
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets