Jump to content

WebP and reprocessing images


Recommended Posts

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. 

Link to comment
Share on other sites

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 by The Old Man
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

We also have WebP support by php gd but still not working when adding that type of image.

image.png.22b67eb30f1a56b24f91f57f8eebfc6c.png

When adding image like this...

image.thumb.png.9f816c2fb99cc7461d81caf0deadb95d.png

Get the same error like other users.

image.png.ab793a637a1ac1a2f29021eaec730ecb.png

 

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. 

image.png.0c6281eb74684cd4cef2beb957b89eea.png

 

 

Have u ever met such a problem like this ? upgrade to 4.6 do nothing to us.

 

Greetings.

 

 

Link to comment
Share on other sites

  • 5 months later...

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>
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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 …

56D9417C-9042-45B6-A990-9B21EA12C117.jpeg

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
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.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...