Permlink Replies: 16 - Pages: 2 [ 1 2 | Next ] - Last Post: 05-May-2020 06:53 Last Post By: karlmistelberger Threads: [ Previous | Next ]
davidekholm

Posts: 3,322
Registered: 18-Oct-2002
WebP support in jAlbum
Posted: 29-Oct-2019 14:25
  Click to reply to this thread Reply
I've been able to compile a 3:rd party library for adding WebP support for jAlbum. It's supposed to work on both Linux, Windows and Mac and I've tested it on Mac (Catalina) and Window 10. To try it, put the following file inside jAlbum's "lib" or "ext" folder, preferably under the "lib" or "ext" folder of jAlbum's config folder (see Tools->Open directories->Config directory), then open jAlbum and feed it WebP images.

Note, jAlbum always generates JPEG images out of the WebP images, even if this library has write capability too. This as the support for the WebP format is still weak among browsers (works in Firefox and Chrome currently, but not in Edge or Safari)

Report bugs straight to the WebP ImageIO project: https://github.com/nintha/webp-imageio-core
Sample images: https://developers.google.com/speed/webp/gallery1
AndreWolff

Posts: 1,769
Registered: 14-Dec-2007
Re: WebP support in jAlbum
Posted: 29-Oct-2019 15:11   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
I did Google WebP and I did not find any program which produces WebP images, but I found this information:
Using WebP, webmasters and web developers can create smaller, richer images that make the web faster
so I think it is more important that jAlbum should produce WebP output!

Edited by: AndreWolff on 29-Oct-2019 16:20
JeffTucker

Posts: 6,979
Registered: 31-Jan-2006
Re: WebP support in jAlbum
Posted: 29-Oct-2019 15:33   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
davidekholm wrote:
... support for the WebP format is still weak among browsers (works in Firefox and Chrome currently, but not in Edge or Safari)

Edge is OK now - Safari is the only laggard.

https://caniuse.com/#feat=webp
davidekholm

Posts: 3,322
Registered: 18-Oct-2002
Re: WebP support in jAlbum
Posted: 29-Oct-2019 17:37   in response to: JeffTucker in response to: JeffTucker
  Click to reply to this thread Reply
jGromit wrote:
davidekholm wrote:
... support for the WebP format is still weak among browsers (works in Firefox and Chrome currently, but not in Edge or Safari)

Edge is OK now - Safari is the only laggard.

https://caniuse.com/#feat=webp


Politics I guess. Apple and Google aren't directly friends these days.
JeffTucker

Posts: 6,979
Registered: 31-Jan-2006
Re: WebP support in jAlbum
Posted: 29-Oct-2019 17:58   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
True. But WebP has been around for almost a decade, and hasn't really caught on. It may just be that with faster download speeds now available to large numbers of people, the file size saving of WebP isn't enough to warrant changing everything.
davidekholm

Posts: 3,322
Registered: 18-Oct-2002
Re: WebP support in jAlbum
Posted: 29-Oct-2019 19:53   in response to: JeffTucker in response to: JeffTucker
  Click to reply to this thread Reply
I guess so, but the fact that it supports transparency should be more appealing.
RobM

Posts: 3,266
Registered: 4-Aug-2006
Re: WebP support in jAlbum
Posted: 29-Oct-2019 22:04   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
I've installed it and it works without issue. I do marvel at the fact I have an Android phone (iPhones are just too, you know…) and it can't save images in the WebP format.

I can't see the point in taking an image in raw/jpg and converting it to WebP, to avoid further artefacts/loss of quality it would need to be converted to the lossless version and that probably won't reduce file size. Still, some people might have a use for it.
wbelvin

Posts: 44
Registered: 30-Aug-2009
Re: WebP support in jAlbum
Posted: 02-May-2020 21:04   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
I am more interested in webp as an output format than input, so that my site becomes more responsive. Speed is now a criterion in google search rankings. As a kludge I did a test of a small album with one image replacing the jpg file references with webp in the jalbum index.html and json files. Skin is photoblogger. Result seemed to work fine. Do you think this would work with more complicated albums? Safari and old IE support is a problem. I would probably need to keep two versions of the album around and serve up the appropriate one depending on browser.

Or better, any chance jalbum will support webp output in the future.
davidekholm

Posts: 3,322
Registered: 18-Oct-2002
Re: WebP support in jAlbum
Posted: 04-May-2020 08:50   in response to: wbelvin in response to: wbelvin
  Click to reply to this thread Reply
wbelvin wrote:

Or better, any chance jalbum will support webp output in the future.

It may happen, but I'm discouraged to see the slow increase of WebP usage among web sites in the world: https://w3techs.com/technologies/details/im-webp, add to that that Apple still refuses to support it. You'd likely need to serve JPEGs as a backup and that would essentially double the album size on the server side. Are you fine with that in order to gain a 30% download speed gain for the browsers that do support WebP?

Edited by: jGromit on 04-May-2020 09:59, to fix link
JeffTucker

Posts: 6,979
Registered: 31-Jan-2006
Re: WebP support in jAlbum
Posted: 04-May-2020 14:05   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
davidekholm wrote:
You'd likely need to serve JPEGs as a backup and that would essentially double the album size on the server side.

Not to mention having to engage in browser sniffing, always a miserable exercise.

ETA: And browser sniffing is on the brink of changing in some major ways, so coding to the current scheme is likely to be a fool's errand:

https://www.infoq.com/news/2020/03/chrome-phasing-user-agent/
wbelvin

Posts: 44
Registered: 30-Aug-2009
Re: WebP support in jAlbum
Posted: 04-May-2020 15:57   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
Thanks for the link to w3techs, I think I'll only start providing webp support on my new pages as a test for now. I suspect Apple will never support webp since they have their own format, and the rest of the world will never support heic due to royalties. Once again a bad situation.
JeffTucker

Posts: 6,979
Registered: 31-Jan-2006
Re: WebP support in jAlbum
Posted: 04-May-2020 16:02   in response to: wbelvin in response to: wbelvin
  Click to reply to this thread Reply
wbelvin wrote:
Speed is now a criterion in google search rankings.

I recall hitting one testing website a few years ago, and the very first recommendation it came up with to improve the loading speed on my site was to reduce the number of images on it. Yeah, OK....
JeffTucker

Posts: 6,979
Registered: 31-Jan-2006
Re: WebP support in jAlbum
Posted: 04-May-2020 16:20   in response to: wbelvin in response to: wbelvin
  Click to reply to this thread Reply
There is a fairly straightforward way to provide WebP images, but not trip up Safari, without doing a lot of browser sniffing. You would, of course, have to maintain two sets of images, and you'd have to hack a skin to provide the appropriate HTML. And I suspect that any skin that's using a third-party image display script would fail miserably with this, simply because the script isn't built to handle it. This would try to use the WebP image, and fall back to the JPG if the browser doesn't support WebP.
<picture>
  <source type="image/webp" srcset="illustration.webp">
  <img src="illustration.jpg" alt="A hand-made illustration">
</picture>
I believe the <picture> tag is supported in all current browsers.

Disclaimer: I haven't tested this.
davidekholm

Posts: 3,322
Registered: 18-Oct-2002
Re: WebP support in jAlbum
Posted: 04-May-2020 17:19   in response to: JeffTucker in response to: JeffTucker
  Click to reply to this thread Reply
What I personally miss the most from JPEG is the lack of transparency support. WebP has it. Stubborn Apple :-(
karlmistelberger

Posts: 207
Registered: 5-Dec-2013
Re: WebP support in jAlbum
Posted: 04-May-2020 17:40   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
davidekholm wrote:
It may happen, but I'm discouraged to see the slow increase of WebP usage among web sites in the world: https://w3techs.com/technologies/details/im-webp, add to that that Apple still refuses to support it. You'd likely need to serve JPEGs as a backup and that would essentially double the album size on the server side. Are you fine with that in order to gain a 30% download speed gain for the browsers that do support WebP?

I think webp is transparent. Chrome and Firefox have setting image.webp.enabled=true (about:config). Whenever the browser accesses a jpeg URI the server will send a webp instead: Serving WebP Images Using mod_rewrite

On rare occasions it makes a difference: http://scienceblogs.de/alpha-cephei/2019/02/15/exomondjaeger-findet-seltsames-paerchen-mit-tess/#comment-4734
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums