WebP is becoming a robust image format, and possible replacement for JPEG, Gif, and PNG. Please put WebP support on the Piwigo roadmap :-) https://developers.google.com/speed/webp/
**Reported by brylie on 20 Apr 2013 05:57**
**Version:** 2.5.1
WebP is becoming a robust image format, and possible replacement for JPEG, Gif, and PNG. Please put WebP support on the Piwigo roadmap :-)
https://developers.google.com/speed/webp/
[Piwigo Bugtracker #2893](http://piwigo.org/bugs/view.php?id=2893)
<!-- github-sync-id:97226564 -->
If all the major web browser support it, and if a world-wide used lib like ImageMagik supports it, we will consider to support it
**Comment posted by flop25 on 22 Apr 2013 16:46**
If all the major web browser support it, and if a world-wide used lib like ImageMagik supports it, we will consider to support it
<!-- github-comment-id:124893080 -->
On peut commencer par une prise en charge de l'extension webp par défaut. Ce serai plus un signe qu'autre chose. Ensuite la génération de miniatures en WebP lorsque les originaux sont en WebP?
--- END FRENCH ---
**Comment posted by lildadou on 24 Apr 2013 22:03**
--- BEGIN FRENCH ---
Le support n'est pas encore généralisé (http://caniuse.com/#feat=webp ) mais dans la mesure où JPEG est à l'image ce que le MPEG3 est à l'audio (un format vieillissant complètement dépassée scientifiquement et trop répandu), que Facebook est en passe de faire du WebP un format industriel (http://news.cnet.com/8301-1023_3-57580664-93/facebook-tries-googles-webp-image-format-users-squawk/ ) et qu'ImageMagick supporte ce format depuis bientôt 2 ans (http://imagemagick.org/script/formats.php ), je pense qu'il n'est pas prématuré de s'attaquer à la prise en charge de ce format.
On peut commencer par une prise en charge de l'extension webp par défaut. Ce serai plus un signe qu'autre chose. Ensuite la génération de miniatures en WebP lorsque les originaux sont en WebP?
--- END FRENCH ---
<!-- github-comment-id:124893096 -->
Si if IM supports it, could you try in Piwigo webp? set $conf['picture_ext'] and $conf['file_ext']
**Comment posted by flop25 on 1 May 2013 20:48**
Si if IM supports it, could you try in Piwigo webp? set $conf['picture_ext'] and $conf['file_ext']
<!-- github-comment-id:124893119 -->
Thanks flop25. Can you please provide explicit instructions on how to modify $conf['picture_ext'] and $conf['file_ext']?
**Comment posted by brylie on 2 May 2013 04:09**
Thanks flop25. Can you please provide explicit instructions on how to modify $conf['picture_ext'] and $conf['file_ext']?
<!-- github-comment-id:124893134 -->
I make the test on:
Piwigo 2.5.1
PHP: 5.3.10-1ubuntu3.6 (Montrer les informations) [2013-05-03 23:41:21]
MySQL: 5.5.31-0ubuntu0.12.04.1 [2013-05-03 23:41:21]
Bibliothèque graphique: External ImageMagick 6.6.9-7
Webp encoder: webp 0.1.3-2.1ubunt (lastest 0.3.0)
Server return: "[Image] unsupported file extension"
:'(
Edit: My version of ImageMagick was not compiled with WebP support. I will compile IM himself
**Comment posted by lildadou on 3 May 2013 21:48**
I make the test on:
Piwigo 2.5.1
PHP: 5.3.10-1ubuntu3.6 (Montrer les informations) [2013-05-03 23:41:21]
MySQL: 5.5.31-0ubuntu0.12.04.1 [2013-05-03 23:41:21]
Bibliothèque graphique: External ImageMagick 6.6.9-7
Webp encoder: webp 0.1.3-2.1ubunt (lastest 0.3.0)
Server return: "[Image] unsupported file extension"
:'(
Edit: My version of ImageMagick was not compiled with WebP support. I will compile IM himself
<!-- github-comment-id:124893159 -->
**Comment posted by flop25 on 3 May 2013 23:36**
Thx
could retry after changing http://piwigo.org/dev/browser/trunk/admin/include/image.class.php#L76 and of course using a compatible version of IM ^^
<!-- github-comment-id:124893168 -->
@future_testers:
For compiling and installing ImageMagick 6.8.5-4 with WebP support on Ubuntu, you need libwep-dev 0.3.0 (the latest version). Availlable packages of libwebp-dev on Ubuntu's repositories are not recent enough ; so you need to compiling and installing libwep-dev too.
This is a script for automatize these tasks. I use checkinstall instead "make install" due to the packaging benefits (ie. you can type apt-get remove imagemagick for uninstall!)
sudo apt-get remove imagemagick libwebp-dev
sudo apt-get install libjpeg8-dev libpng12-dev libtiff4-dev
wget https://launchpad.net/imagemagick/main/6.8.5-4/+download/ImageMagick-6.8.5-4.tar.gz
wget https://webp.googlecode.com/files/libwebp-0.3.0.tar.gz
tar xf ImageMagick-6.8.5-4.tar.gz
tar xf libwebp-0.3.0.tar.gz
cd libwebp-0.3.0
./configure
make --jobs=2
sudo checkinstall --pkgname=libwebp-dev --pkgversion="0.3.0" --backup=no --deldoc=yes --fstrans=no --default
cd ../ImageMagick-6.8.5-4
./configure --with-webp
make --jobs=2
sudo checkinstall --pkgname=imagemagick --pkgversion="6.8.5-4" --backup=no --deldoc=yes --fstrans=no --default
sudo ldconfig
Ensure ImageMagick installation, "convert -list format | grep -i webp" must return like "WEBP* rw- WebP Image Format (libwebp 0.3.0)"
**Comment posted by lildadou on 4 May 2013 15:10**
@flop25:
I install a "WebP ready" ImageMagick and i added 'webp' on http://piwigo.org/dev/browser/trunk/admin/include/image.class.php#L76
and it works (only on Chrome 26.0.1410.64).
Just care to disable GThumb+ :'(
@future_testers:
For compiling and installing ImageMagick 6.8.5-4 with WebP support on Ubuntu, you need libwep-dev 0.3.0 (the latest version). Availlable packages of libwebp-dev on Ubuntu's repositories are not recent enough ; so you need to compiling and installing libwep-dev too.
This is a script for automatize these tasks. I use checkinstall instead "make install" due to the packaging benefits (ie. you can type apt-get remove imagemagick for uninstall!)
sudo apt-get remove imagemagick libwebp-dev
sudo apt-get install libjpeg8-dev libpng12-dev libtiff4-dev
wget https://launchpad.net/imagemagick/main/6.8.5-4/+download/ImageMagick-6.8.5-4.tar.gz
wget https://webp.googlecode.com/files/libwebp-0.3.0.tar.gz
tar xf ImageMagick-6.8.5-4.tar.gz
tar xf libwebp-0.3.0.tar.gz
cd libwebp-0.3.0
./configure
make --jobs=2
sudo checkinstall --pkgname=libwebp-dev --pkgversion="0.3.0" --backup=no --deldoc=yes --fstrans=no --default
cd ../ImageMagick-6.8.5-4
./configure --with-webp
make --jobs=2
sudo checkinstall --pkgname=imagemagick --pkgversion="6.8.5-4" --backup=no --deldoc=yes --fstrans=no --default
sudo ldconfig
Ensure ImageMagick installation, "convert -list format | grep -i webp" must return like "WEBP\* rw- WebP Image Format (libwebp 0.3.0)"
<!-- github-comment-id:124893193 -->
**Comment posted by lildadou on 4 May 2013 15:59**
Visit https://mediabunker.s0rc3r.net/piwigo/index.php?/category/410 for viewing WebP usage.
PS: you can see some bugs with the ajax loader
<!-- github-comment-id:124893210 -->
**Comment posted by rvelices on 6 May 2013 20:41**
no way.
in my firefox nothing is displayed with webp from your page - https://mediabunker.s0rc3r.net/piwigo/index.php?/category/410
<!-- github-comment-id:124893219 -->
that's why using the conf will let the dev/admin choose
Of course Piwigo will not support by default webp until this format is massivel supported especially by all the major browsers
**Comment posted by flop25 on 6 May 2013 20:45**
that's why using the conf will let the dev/admin choose
Of course Piwigo will not support by default webp until this format is massivel supported especially by all the major browsers
<!-- github-comment-id:124893237 -->
@rvelices: Firefox display WebP image only when using the markup <video> instead <image>.
Source: http://caniuse.com/#feat=webp
@flop25: If piwigo will be an early adopter then maybe it will benifit of a good visiblity :)
**Comment posted by lildadou on 6 May 2013 21:09**
@rvelices: Firefox display WebP image only when using the markup <video> instead <image>.
Source: http://caniuse.com/#feat=webp
@flop25: If piwigo will be an early adopter then maybe it will benifit of a good visiblity :)
<!-- github-comment-id:124893251 -->
@lildadou: well Piwigo will permit to fully manage webp and other formats so we will get that visibility by specifying webp as an example ;)
What we will not do is to force the server to manage webp files by adding webp in the default config, because its use is marginal and there is too much requirements
**Comment posted by flop25 on 6 May 2013 21:42**
@lildadou: well Piwigo will permit to fully manage webp and other formats so we will get that visibility by specifying webp as an example ;)
What we will not do is to force the server to manage webp files by adding webp in the default config, because its use is marginal and there is too much requirements
<!-- github-comment-id:124893264 -->
Regarding server side support, libgd and imagemagik support it. However I don't know if they are build by default with WebP support. I least my version of libgd is not compiled with webp support.
For PHP GD support can be tested like this: <?php var_dump(gd_info()); ?>
Regarding client support, it seems WebP has gain almost universal web-browser support. Chrome & Opera already had support. In 2018 Edge added support, in 2019 Firefox has added support.
https://caniuse.com/#feat=webp
https://developers.google.com/speed/webp/faq#which_web_browsers_natively_support_webp
The only one missing seems to be Safari. However for Safari or older browsers a javascript polyfill can be used https://github.com/chase-moskal/webp-hero . Or more simple, a html fallback method https://www.html5rocks.com/en/tutorials/responsive/picture-element/#toc-file-type
Regarding server side support, libgd and imagemagik support it. However I don't know if they are build by default with WebP support. I least my version of libgd is not compiled with webp support.
For PHP GD support can be tested like this:
`<?php
var_dump(gd_info());
?>`
<!-- github-comment-id:521574523 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reported by brylie on 20 Apr 2013 05:57
Version: 2.5.1
WebP is becoming a robust image format, and possible replacement for JPEG, Gif, and PNG. Please put WebP support on the Piwigo roadmap :-)
https://developers.google.com/speed/webp/
Piwigo Bugtracker #2893
Comment posted by brylie on 20 Apr 2013 06:00
This library may be helpful:
https://github.com/rsky/php-webp
Comment posted by flop25 on 22 Apr 2013 16:46
If all the major web browser support it, and if a world-wide used lib like ImageMagik supports it, we will consider to support it
Comment posted by lildadou on 24 Apr 2013 22:03
--- BEGIN FRENCH ---
Le support n'est pas encore généralisé (http://caniuse.com/#feat=webp ) mais dans la mesure où JPEG est à l'image ce que le MPEG3 est à l'audio (un format vieillissant complètement dépassée scientifiquement et trop répandu), que Facebook est en passe de faire du WebP un format industriel (http://news.cnet.com/8301-1023_3-57580664-93/facebook-tries-googles-webp-image-format-users-squawk/ ) et qu'ImageMagick supporte ce format depuis bientôt 2 ans (http://imagemagick.org/script/formats.php ), je pense qu'il n'est pas prématuré de s'attaquer à la prise en charge de ce format.
On peut commencer par une prise en charge de l'extension webp par défaut. Ce serai plus un signe qu'autre chose. Ensuite la génération de miniatures en WebP lorsque les originaux sont en WebP?
--- END FRENCH ---
Comment posted by brylie on 26 Apr 2013 05:24
ImageMagick WebP:
http://www.imagemagick.org/script/webp.php
PHP WebP:
http://php.net/manual/en/function.imagewebp.php
Browser support:
https://en.wikipedia.org/wiki/Webp#Support
Comment posted by flop25 on 1 May 2013 20:48
Si if IM supports it, could you try in Piwigo webp? set $conf['picture_ext'] and $conf['file_ext']
Comment posted by brylie on 2 May 2013 04:09
Thanks flop25. Can you please provide explicit instructions on how to modify $conf['picture_ext'] and $conf['file_ext']?
Comment posted by flop25 on 3 May 2013 15:46
Check the Doc about the local configuration
Comment posted by lildadou on 3 May 2013 21:48
I make the test on:
Piwigo 2.5.1
PHP: 5.3.10-1ubuntu3.6 (Montrer les informations) [2013-05-03 23:41:21]
MySQL: 5.5.31-0ubuntu0.12.04.1 [2013-05-03 23:41:21]
Bibliothèque graphique: External ImageMagick 6.6.9-7
Webp encoder: webp 0.1.3-2.1ubunt (lastest 0.3.0)
Server return: "[Image] unsupported file extension"
:'(
Edit: My version of ImageMagick was not compiled with WebP support. I will compile IM himself
Comment posted by flop25 on 3 May 2013 23:36
Thx
could retry after changing http://piwigo.org/dev/browser/trunk/admin/include/image.class.php#L76 and of course using a compatible version of IM ^^
Comment posted by lildadou on 4 May 2013 15:10
@flop25:
I install a "WebP ready" ImageMagick and i added 'webp' on http://piwigo.org/dev/browser/trunk/admin/include/image.class.php#L76
and it works (only on Chrome 26.0.1410.64).
Just care to disable GThumb+ :'(
@future_testers:
For compiling and installing ImageMagick 6.8.5-4 with WebP support on Ubuntu, you need libwep-dev 0.3.0 (the latest version). Availlable packages of libwebp-dev on Ubuntu's repositories are not recent enough ; so you need to compiling and installing libwep-dev too.
This is a script for automatize these tasks. I use checkinstall instead "make install" due to the packaging benefits (ie. you can type apt-get remove imagemagick for uninstall!)
sudo apt-get remove imagemagick libwebp-dev
sudo apt-get install libjpeg8-dev libpng12-dev libtiff4-dev
wget https://launchpad.net/imagemagick/main/6.8.5-4/+download/ImageMagick-6.8.5-4.tar.gz
wget https://webp.googlecode.com/files/libwebp-0.3.0.tar.gz
tar xf ImageMagick-6.8.5-4.tar.gz
tar xf libwebp-0.3.0.tar.gz
cd libwebp-0.3.0
./configure
make --jobs=2
sudo checkinstall --pkgname=libwebp-dev --pkgversion="0.3.0" --backup=no --deldoc=yes --fstrans=no --default
cd ../ImageMagick-6.8.5-4
./configure --with-webp
make --jobs=2
sudo checkinstall --pkgname=imagemagick --pkgversion="6.8.5-4" --backup=no --deldoc=yes --fstrans=no --default
sudo ldconfig
Ensure ImageMagick installation, "convert -list format | grep -i webp" must return like "WEBP* rw- WebP Image Format (libwebp 0.3.0)"
Comment posted by lildadou on 4 May 2013 15:59
Visit https://mediabunker.s0rc3r.net/piwigo/index.php?/category/410 for viewing WebP usage.
PS: you can see some bugs with the ajax loader
Comment posted by rvelices on 6 May 2013 20:41
no way.
in my firefox nothing is displayed with webp from your page - https://mediabunker.s0rc3r.net/piwigo/index.php?/category/410
Comment posted by flop25 on 6 May 2013 20:45
that's why using the conf will let the dev/admin choose
Of course Piwigo will not support by default webp until this format is massivel supported especially by all the major browsers
Comment posted by lildadou on 6 May 2013 21:09
@rvelices: Firefox display WebP image only when using the markup <video> instead <image>.
Source: http://caniuse.com/#feat=webp
@flop25: If piwigo will be an early adopter then maybe it will benifit of a good visiblity :)
Comment posted by flop25 on 6 May 2013 21:42
@lildadou: well Piwigo will permit to fully manage webp and other formats so we will get that visibility by specifying webp as an example ;)
What we will not do is to force the server to manage webp files by adding webp in the default config, because its use is marginal and there is too much requirements
Hi, so what is the status of webp in Piwigo? All browsers support it, imagemagic supports it - Piwigo?
Hi, I'm also interested by this feature ! Any update ?
Regarding client support, it seems WebP has gain almost universal web-browser support. Chrome & Opera already had support. In 2018 Edge added support, in 2019 Firefox has added support.
https://caniuse.com/#feat=webp
https://developers.google.com/speed/webp/faq#which_web_browsers_natively_support_webp
The only one missing seems to be Safari. However for Safari or older browsers a javascript polyfill can be used https://github.com/chase-moskal/webp-hero . Or more simple, a html fallback method https://www.html5rocks.com/en/tutorials/responsive/picture-element/#toc-file-type
Regarding server side support, libgd and imagemagik support it. However I don't know if they are build by default with WebP support. I least my version of libgd is not compiled with webp support.
For PHP GD support can be tested like this:
<?php var_dump(gd_info()); ?>