Implemented Google WebP Support

Floren

Well-known member
This would an amazing enhancement for attachments, especially for sites that use many large pictures.
WebP is a new image format that provides lossless and lossy compression for images on the web. WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at equivalent SSIM index. WebP supports lossless transparency (also known as alpha channel) with just 22% additional bytes. Transparency is also supported with lossy compression and typically provides 3x smaller file sizes compared to PNG when lossy compression is acceptable for the red/green/blue color channels. Webmasters and web developers can use the WebP image format to create smaller and richer images that can help make the web faster.
GD (PHP 5.5) and ImageMagick are supporting WebP. This could be made as option available if PHP 5.5+ is detected. Many of us already use PHP 5.5 anyways.
 
Last edited:
Upvote 115
This suggestion has been implemented. Votes are no longer accepted.
Hey, where we standing on this right now?

I can go for the image optimizer from @truonghungđz right now, because I'm in the point that is really need it to save a LOT of server resources.

But, in another hand, i don't know the plans from XF, so, if i spend money on some add-on that is already "legacy", i don't know what to do.
 
XF devs have hinted in another thread that they are a bit behind on adding support for webp so we might finally get internal support for it in near future. Latest build added proxy support for webp images. But fact remains that they are not likely to add a converter as a native feature so if you plan to pay for an addon, I think it would be a safe thing to do. Can you link to the optimizer you are talking about? That account seems to have no posts or resources associated with it.
 
XF devs have hinted in another thread that they are a bit behind on adding support for webp so we might finally get internal support for it in near future. Latest build added proxy support for webp images. But fact remains that they are not likely to add a converter as a native feature so if you plan to pay for an addon, I think it would be a safe thing to do. Can you link to the optimizer you are talking about? That account seems to have no posts or resources associated with it.

He means @truonglv, the other member comes up first when you type truong.
 
Right. Since XenForo does not support WebP on attachments right now, this addon compresses images to same format. WebP in future might provide better compression if addon developers add an option to convert JPEGs and PNGs to WebPs. But it should be safe to get this addon and optimize images and hope to see WebP conversion addons in future.
 
Right. Since XenForo does not support WebP on attachments right now, this addon compresses images to same format. WebP in future might provide better compression if addon developers add an option to convert JPEGs and PNGs to WebPs. But it should be safe to get this addon and optimize images and hope to see WebP conversion addons in future.
There is new add-on support webp coming soon
 
Literally going through this right now, but using a different service that provides some pretty powerful functionality:

If you add this as CDN support, you can serve a lot of your images through this service and provide a ton of power to your static images.
 
Last edited:
It is in XF best interest that websites running XF rates highly in Google/Lighthouse speed test.

Page speed does affect SEO. Page speed is a direct ranking factor, which has been known since the Google Algorithm Speed Update.

Now, about 50% of searches are done on mobile, according to Google Studies. They also show that users leave the site after about 3 seconds. So if you have a poor score on mobile (even though your desktop scores are decent), this means that Google will conclude that = End user experience bad, and Google doesn’t like ranking sites which provide bad user experience.

And right now, not supporting WebP (and possibly future modern image format, such as AVIF or JPEG XL) massively affects the data metrics negatively, depending on how image heavy your website is.
 
Last edited:
And right now, not supporting WebP (or another modern image format, such as AVIF or JPEG XL) massively affects the data metrics negatively, depending on how image heavy your website is.
You make it sound like AVIF and JPEG XL are viable alternatives to WebP. There isn't a single browser in use today that supports JPEG XL. And AVIF support is basically just Chrome and Firefox. Only 69% of browsers.

Support for WebP has perhaps been more patchy than people realise. It's 96% now but:
  • No IE11 support at all
  • Edge didn't support it until version 18 in 2018
  • Firefox didn't support it until 2019
  • Safari didn't support it until macOS 11 in 2020
  • Safari didn't support it until iOS 14 in 2020
These are important considerations so I think it was worthwhile holding off. Not much holding us back now though...
 
You make it sound like AVIF and JPEG XL are viable alternatives to WebP

Wasn't the intention. Just that those are modern image formats that probably will be more relevant in the future. Right now WebP is the primary one.

No IE11 support at all

None should use that. Ever. :p

All other modern browsers were supported in 2020. WP got on board in 2021. XF should get on board now.

Not much holding us back now though...

Excellent Chris ;)

Then I can't wait to fix this:
1638201821108.webp
8.33 seconds is a lot. My page speed score screams for ditching those PNGs and JPGs.
 
Wasn't the intention. Just that those are modern image formats that probably will be more relevant in the future. Right now WebP is the primary one.



None should use that. Ever. :p

All other modern browsers were supported in 2020. WP got on board in 2021. XF should get on board now.



Excellent Chris ;)

Then I can't wait to fix this:
View attachment 261036
8.33 seconds is a lot. My page speed score screams for ditching those PNGs and JPGs.
Yeah, I would love to see this fixed too.
 
Top Bottom