GanesH RahuL
GanesH RahuL

Reputation: 813

How can I Enable Webp support in php GD library in xampp on linux

I have XAMPP for Linux 7.0.8.

And enabled with GD Support.

screenshot of phpinfo(); about GD

I want to use imagewebp();. I have error while using this,

Fatal error: Uncaught Error: Call to undefined function imagewebp()

while searching for a solution I have concluded with is solution from http://php.net/manual/en/image.installation.php

Image Format | Configure Switch

webp | To enable support for webp add --with-vpx-dir=DIR . Available as of PHP 5.5.

I want to enable webp support.

What I want to do?

Upvotes: 4

Views: 8670

Answers (2)

GanesH RahuL
GanesH RahuL

Reputation: 813

I finally came up with a Solution of Uninstalling XAMPP Application and installing Native LAMP stack server.

Why Because I cannot Recompile PHP in XAMPP. It will be more difficult.

I used My native Linux Apache/PHP installation instead, So I can download source packages and recompile PHP to my needs.

Upvotes: 0

user3720445
user3720445

Reputation:

You can go to Google and build webP libraries from source code in your server. https://developers.google.com/speed/webp/download

And as far as I concerned Ubuntu and Debian does not bundle the GD libs with them because of some kind of security reasons. (I don't know which distro that you use) You can recompile the PHP or add with this for Ubuntu:

sudo apt-get install php5-gd

don't forget the restart your web server. You can do it same for RPM packages as well.

Upvotes: 1

Related Questions