Forum Moderators: coopster

Message Too Old, No Replies

Convert images to webp

         

xCart

4:23 pm on Feb 8, 2019 (gmt 0)

5+ Year Member



I'm looking for a ready-made php class that would convert different image formats to webp. Does anyone have information about it?

typomaniac

8:53 pm on Feb 8, 2019 (gmt 0)

10+ Year Member Top Contributors Of The Month



I found some links in a quick search. I think a quick google job would help.
[digitalocean.com ]

tangor

9:32 pm on Feb 8, 2019 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Welcome to Webmasterworld @xCart!

Bing also has a bunch out there as well. With any cut and paste code, make sure it does what you want!

xCart

7:08 am on Feb 11, 2019 (gmt 0)

5+ Year Member



Thanks to Typomaniac but I can't install such an extension on the server. I need some php class because it is supposed to work with Joomla CMS.

robzilla

10:09 am on Feb 11, 2019 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Not possible locally if you can't install the WebP codec on the server.

I think you'll have to use a conversion service with an API, like kraken.io.

This may also be of interest: [yireo.com...]

robzilla

1:21 pm on Feb 11, 2019 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Correction: it seems GD has some built-in support for webp: [php.net...]

Check phpinfo() to see if the GD extension on your server has WebP support enabled.

xCart

2:20 pm on Feb 12, 2019 (gmt 0)

5+ Year Member



The problem with external api is that they are paid. I will not convince my clients to solve this problem. They want to pay once and have.

Very strange that there are no such solutions in the network. Webp is already an old file format :|

I have the imagewebp function available in PHP, but I can't convert transparent png images to webp. That's why I'm looking for a ready-made class. Something like phpThumb but with webp support.

:D

rainborick

6:24 am on Feb 17, 2019 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I didn't spot exactly when webp support was added, but ImageMagick v7.x+ should support webp conversions. ImageMagick is widely available, along with a PHP class. But even if the class isn't on your server, if a compatible version of ImageMagick is there you can access it through a system() or passthru() call. Something to check into, anyway.