WebP format in macOS and XAMPP

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

WebP format in macOS and XAMPP

Postby Pumita70 » 31. March 2023 16:56

Hello, First of all, thanks a lot for the great resource that XAMPP is!

I'm working on a project that involves images with WebP format and I can't make it work in macOS 10.15.7

The error I'm getting is: Fatal error: Uncaught Error: Call to undefined function imagecreatefromwebp()

I upgraded the XAMPP version to the today current latest (8.2.0) and it still not working.

Is there any way that I can enable this? since it seems like something minimal that must be set to make it happen but I can't find the way!

Once again thanks for the great tool that XAMPP is.

Regards
Jose
Pumita70
 
Posts: 4
Joined: 31. March 2023 16:30
XAMPP version: XAMPP for OS X 8.2.0
Operating System: macOS 10.15.7

Re: WebP format in macOS and XAMPP

Postby Nobbie » 01. April 2023 11:32

Xampp (i.e.the GD library) is not compiled with WebP support. I dont know about plans from Bitnami about including WebP, as it is still not used often. The Internet Standard is still JPEG, even if WebP can compress better.

Instead of waiting for WebP support you really should convert your grafics to JPEG instead. That does not take long and you get rid off WebP.
Nobbie
 
Posts: 13165
Joined: 09. March 2008 13:04

Re: WebP format in macOS and XAMPP

Postby Pumita70 » 01. April 2023 17:45

Nobbie wrote:Xampp (i.e.the GD library) is not compiled with WebP support. I dont know about plans from Bitnami about including WebP, as it is still not used often. The Internet Standard is still JPEG, even if WebP can compress better.

Instead of waiting for WebP support you really should convert your grafics to JPEG instead. That does not take long and you get rid off WebP.


Hello!
Thanks for the tip, but I'm in the opposite direction! several big sites are moving to WebP and leaving JPEG, if you see this https://caniuse.com/webp you can see that all browsers (but extinguished IE) support it. I'm working with jpg generation for decades and now this format (which is not brand new) is replacing it, especially in sites like online supermarkets and such.

XAMPP comes with WebP installed but is wrongly compiled or something.

Hope I can found for a solution here.
Pumita70
 
Posts: 4
Joined: 31. March 2023 16:30
XAMPP version: XAMPP for OS X 8.2.0
Operating System: macOS 10.15.7

Re: WebP format in macOS and XAMPP

Postby Nobbie » 02. April 2023 12:51

Pumita70 wrote:several big sites are moving to WebP and leaving JPEG, if you see this https://caniuse.com/webp you can see that all browsers (but extinguished IE) support it. I'm working with jpg generation for decades and now this format (which is not brand new) is replacing it, especially in sites like online supermarkets and such.


And?? I dont care what supermarkets do. You are wasting your time.

20 years ago I would have agreed - but not today anymore. The Internet has become so powerfull, you even could use uncompressed bitmaps in your sites and it would not matter. Nowadays, people are streaming huge 4k videos from Netflix and you think about saving a few bytes using WebP instead of JPG? Thats ridiculous. You already wasted more of your highly valuable time than you can ever save by using WebP instead of JPG.

Pumita70 wrote:XAMPP comes with WebP installed but is wrongly compiled or something.


No, it does not. Why do you ask if you seems to know better? Your GD Library (which mostly is delivered with Xampp) probably does NOT support WebP. It is NOT sufficient to compile Xampp with the enable WebP flag. That only activates the API, but it does NOT deliver the related GD Library.

Run this program in your localhost environment:

Code: Select all
<?php
        $gd = gd_info();

        echo "<pre>";

        print_r($gd);

        echo "</pre>";
?>


and show us the output. On my Xampp 8.1.4 Linux installation it shows this:

Array
(
[GD Version] => bundled (2.1.0 compatible)
[FreeType Support] => 1
[FreeType Linkage] => with freetype
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPEG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] =>
[XBM Support] => 1
[WebP Support] =>
[BMP Support] => 1
[AVIF Support] =>
[TGA Read Support] => 1
[JIS-mapped Japanese Font Support] =>
)


As you can see, "WebP Support" is EMPTY(!), not 1. There is no WebP support in the bundled GD Library of Xampp. Of course you can still go on and waste your time, it is your time.
Nobbie
 
Posts: 13165
Joined: 09. March 2008 13:04

Re: WebP format in macOS and XAMPP

Postby Pumita70 » 02. April 2023 17:18

Thanks for taking the time to answer my questions.

I really do care about it since I'm working on a project that will be similar to a supermarket. Also where I live and work and more importantly where the project will run (Argentina) do have not so fast internet connections yet, of course, Netflix runs as well here :) but unfortunately, I still need to take care of sizes.

I did run the test you provide and I got the same results.

I did also run the http://localhost/dashboard/phpinfo.php that comes with XAMPP and found this '--with-libwebp' in the Configure Command! also found in this post https://community.apachefriends.org/f/viewtopic.php?f=17&t=81325&p=274593&hilit=webp#p274593 about the proper way it should be...

I'm really not good at compiling or installing this on my own to achieve something like this complete working environment and that's why I'm asking about it.

Please don't get me wrong I'm not trying to bother anyone or ask for weird stuff, I only think that this is really close to being done in my local testing server and that I may get some directions on how to fix it.
The production server works well with WebP read and generate the files as expected but it would be great to work on all tests locally and then upload a decent version.
Pumita70
 
Posts: 4
Joined: 31. March 2023 16:30
XAMPP version: XAMPP for OS X 8.2.0
Operating System: macOS 10.15.7

Re: WebP format in macOS and XAMPP

Postby Nobbie » 02. April 2023 22:35

You cannot fix it. Either dont use Xampp, or wait until Bitnami integrates WebP into GD Library. There is nothing else.
Nobbie
 
Posts: 13165
Joined: 09. March 2008 13:04

Re: WebP format in macOS and XAMPP

Postby Pumita70 » 02. April 2023 23:36

I'm so glad about your answer.
If there is something that is wrong I now can have hope that it can be fixed!

Thanks a lot and wish you a great weekend!
Pumita70
 
Posts: 4
Joined: 31. March 2023 16:30
XAMPP version: XAMPP for OS X 8.2.0
Operating System: macOS 10.15.7

Re: WebP format in macOS and XAMPP

Postby angelo.webp » 20. August 2023 17:10

Hi,
there is any solution about this issue or not yet?

Thank you for your help
Angelo
angelo.webp
 
Posts: 1
Joined: 20. August 2023 17:07
XAMPP version: 8.2.4
Operating System: MAC OS


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 43 guests