asigno Posted June 30, 2021 Posted June 30, 2021 Hi all, Now that 4.6 supports WebP I was wondering if anyone knows how I can reprocess all my forum images to WebP? I've tried using Google's mod_pagespeed server tool before but had issues I couldn't resolve. I've Cheers Alex SeNioR- and sobrenome 2
The Old Man Posted July 1, 2021 Posted July 1, 2021 (edited) Based on https://squoosh.app you could try their CLI tool to batch convert a folder... https://github.com/GoogleChromeLabs/squoosh/tree/dev/cli Or API: https://github.com/GoogleChromeLabs/squoosh Or Google's own CLI... https://developers.google.com/speed/webp/download Edited July 1, 2021 by The Old Man asigno, SeNioR- and sobrenome 3
asigno Posted July 1, 2021 Author Posted July 1, 2021 Thanks, I was hoping for an automated method which would also update all the links in the forum. sobrenome and SeNioR- 2
opentype Posted July 1, 2021 Posted July 1, 2021 I wouldn’t be so eager to convert everything. First of all, there are still users who cannot see WebP images at all and switching over to WebP without keeping all previous images as fall-back would mean they don’t see any images at all. Second, the format itself doesn’t guarantee better images, especially if the WebP version is generated from an already compressed or optimized source image. SeNioR-, Maxxius, sobrenome and 2 others 2 3
The Old Man Posted July 1, 2021 Posted July 1, 2021 (edited) 7 hours ago, asigno said: Thanks, I was hoping for an automated method which would also update all the links in the forum. AFAIK they've been a little vague about how support for WebP images works in 4.6. A search for WebP in the AdminCP live search brings up no results. The quality setting is mentioned in Image Settings. My server has support for WebP but if I go to upload a Logo in the theme settings it doesn't mention WebP at all, just gif, jpeg, jpe, jpg, png. Same if I go to upload a profile cover photo. If I try uploading a WebP image, I get a message saying "Allowed file extensions are: gif, jpeg, jpe, jpg, png", even though I have Allowed File Types set to the default of 'All Files', Allowed File Extensions set to 'No Restriction', ImageMagick and GD2 installed with their PHP extensions. I was interested to see how this would work because despite being around for a decade or so, it's only now that modern browsers support WebP, only Safari on MacOS has some remaining caveats. Using a picture html element is recommended to provide fallback PNG/JPEG etc images, but it gets tricky with background element images. You might be better with an on-the-fly type service like Cloudinary or Cloudflare's offering at the moment, they have a free tier. Edited July 1, 2021 by The Old Man asigno and sobrenome 2
Stuart Silvester Posted July 1, 2021 Posted July 1, 2021 If your GD/ImageMagick libraries (whichever one you may be using) support WebP you will see webp listed on the allowed extensions when uploading images. The Old Man, Clover13, SeNioR- and 1 other 3 1
Nathan Explosion Posted July 1, 2021 Posted July 1, 2021 A simple check: open the phpinfo page, via the support dashboard in the ACP. Search for webp: If GD/ImageMagick (whichever you have enabled in the 'Image Settings' in the ACP) don't display those then no webp. Clover13, Maxxius, sobrenome and 2 others 4 1
The Old Man Posted July 1, 2021 Posted July 1, 2021 Thanks Nathan. I rechecked my server and it seems its enabled for GD2 only. I have a CPanel and CentOS 7 based server and apparently need to recompile Imagick with the WebP extension and latest version of libwebp. I had Imagick 7 and WebP support before my recent container move last week but also Imagick 6 kept reinstalling itself and taking over. Updated today: How to enable the webp image format for use with ImageMagick on cPanel SeNioR-, Clover13 and sobrenome 3
asigno Posted July 4, 2021 Author Posted July 4, 2021 On 7/1/2021 at 4:04 PM, opentype said: I wouldn’t be so eager to convert everything. First of all, there are still users who cannot see WebP images at all and switching over to WebP without keeping all previous images as fall-back would mean they don’t see any images at all. Second, the format itself doesn’t guarantee better images, especially if the WebP version is generated from an already compressed or optimized source image. True, but it's highly likely that those users are making up less than 1% of my traffic. I wasn't looking to use WebP to give better images, I want to use WebP as from my other sites I've seen it reduce image size on average by about 30% with no trade off on image quality. This made a noticable improvement to page speed and also reduced my bandwidth. I was hoping, well assumed, that the IPB implementation would support the actual serving and processing of the images just like many Wordpress plugins do. It shoudln't be reliant on a user to upload a WebP image, as who the hell would do that. There's free Wordpress extensions which dyamically process and serve WebP images only to browsers which support the format. I'm puzzled why this type of support isn't included in a paid platform. sobrenome 1
AlexWebsites Posted July 16, 2021 Posted July 16, 2021 Yeah I was hoping to see images being served webp based on the user's browser to help with image loading speed. Its nice you can upload them now though, but I don't see any functionality outside of accepting webp images. I was doing this with mod_pagespeed but ran into some theme caching issues so I disabled it. asigno, sobrenome and SeNioR- 3
wegorz23 Posted August 10, 2021 Posted August 10, 2021 We also have WebP support by php gd but still not working when adding that type of image. When adding image like this... Get the same error like other users. Also trying to install all packets and fix it by my self but still no luck. php 7,2,,,, gd and imageMagick installed. On ACP Image settings when set ImageMagick i can upload .webp files as file but not as image. Have u ever met such a problem like this ? upgrade to 4.6 do nothing to us. Greetings. sobrenome 1
Afrodude Posted August 10, 2021 Posted August 10, 2021 21 minutes ago, wegorz23 said: We also have WebP support by php gd but still not working when adding that type of image. What about the ACP have you tried to test on uploading WebP as a logo for example? If yes, did it gave you same error ? sobrenome 1
wegorz23 Posted August 10, 2021 Posted August 10, 2021 2 hours ago, Afrodude said: What about the ACP have you tried to test on uploading WebP as a logo for example? If yes, did it gave you same error ? The same. sobrenome 1
Stuart Silvester Posted August 10, 2021 Posted August 10, 2021 You'll need to upgrade to PHP 7.3 - imagecreatefromstring() cannot detect WebP in earlier versions https://www.php.net/manual/en/function.imagecreatefromstring.php sobrenome, SeNioR- and Afrodude 3
SeNioR- Posted January 19, 2022 Posted January 19, 2022 Has anyone tried this code? <IfModule mod_rewrite.c> RewriteEngine On # Check if browser supports WebP images RewriteCond %{HTTP_ACCEPT} image/webp # Check if WebP replacement image exists RewriteCond %{DOCUMENT_ROOT}/$1.webp -f # Serve WebP image instead RewriteRule (.+)\.(jpe?g|png|gif)$ $1.webp [T=image/webp,E=REQUEST_image] </IfModule> <IfModule mod_headers.c> # Vary: Accept for all the requests to jpeg, png and gif Header append Vary Accept env=REQUEST_image </IfModule> <IfModule mod_mime.c> AddType image/webp .webp </IfModule> balazsp 1
Markus Jung Posted January 22, 2022 Posted January 22, 2022 On 6/30/2021 at 8:10 AM, asigno said: Now that 4.6 supports WebP Do I have to enable this somewhere in AdminCP (IPS-Cloud)?
Randy Calvert Posted January 22, 2022 Posted January 22, 2022 9 hours ago, Markus Jung said: Do I have to enable this somewhere in AdminCP (IPS-Cloud)? No. It should automatically show up as an available file format when a user attempts to upload a picture. It won’t convert existing images but it will support a webp image being added. Markus Jung 1
Kjell Iver Johansen Posted January 23, 2022 Posted January 23, 2022 I'm testing out on my sites now - can't seem to open webp images in Lightbox - does webp images open in Lightbox on this software?
opentype Posted January 23, 2022 Posted January 23, 2022 3 minutes ago, Kjell Iver Johansen said: I'm testing out on my sites now - can't seem to open webp images in Lightbox - does webp images open in Lightbox on this software? You need to be more specific or link an example. What’s the error message? Is the file not being generated? 404? Permission denied? …? In general, the support is global. It should work everywhere or not at all.
Kjell Iver Johansen Posted January 23, 2022 Posted January 23, 2022 2 hours ago, opentype said: You need to be more specific or link an example. What’s the error message? Is the file not being generated? 404? Permission denied? …? In general, the support is global. It should work everywhere or not at all. When I click an image in webp format it opens in the Windows tab and it is not displayed the usual way. I think it is called lightbox -as shown here - with arrows … SeNioR- 1
opentype Posted January 23, 2022 Posted January 23, 2022 True. I can replicate that. It’s treated as if it would be a non-image attachment. Testing here: WEBP: JPG: SeNioR- 1
Kjell Iver Johansen Posted January 23, 2022 Posted January 23, 2022 8 minutes ago, opentype said: I can replicate that. It’s treated as if it would be a non-image attachment Thanks - It seems like there is a line in lightbox that need a simple fix - I will not try that myselve but maybe Ips could have a look https://stackoverflow.com/questions/59802973/how-to-use-webp-images-in-lightbox SeNioR- 1
bradl Posted March 2, 2022 Posted March 2, 2022 I had to switch image handler to GD as ImageMagick wasn't displaying a user uploaded webp image. IPS hosted so not sure of which php extensions enabled (can't find phpinfo as on self-hosted).
My Sharona Posted March 14, 2022 Posted March 14, 2022 On 7/1/2021 at 7:40 AM, Stuart Silvester said: If your GD/ImageMagick libraries (whichever one you may be using) support WebP you will see webp listed on the allowed extensions when uploading images. Is this not supported on the IPS Cloud?
Stuart Silvester Posted March 14, 2022 Posted March 14, 2022 1 hour ago, My Sharona said: Is this not supported on the IPS Cloud? Yes and no, it's currently only supported on Cloud when using GD library to process images but we default to ImageMagick library since it's much better (speed, resource usage etc) for processing images. We are going to be reviewing this soon, so I've made a note for us to look further into this. bradl and My Sharona 2
Recommended Posts