Speed up your web page loading with WebP

Khalyomede on February 25, 2019

Images are widely used Images take more and more space in our bandwidth. W3Techs statistic shows that 90% of all websites uses image... [Read Full]
markdown guide
 

Thanks for this post, its very interesting.
Nethertheless, I think its hard to say that 71% coverage is good enought because, to be sure this will works, we also need to cross this with the support of the <picture> element which is 81% coverage.
I know I'm too sceptical here but I'm mostly desperate to see how slow are browsers to implement W3C living standards...

 

The reason the <picture> syntax is structured that way is to enable progressive enhancement. If a browser does not understand how to handle <picture>, then the <img> inside is shown instead. Same with source being forward-looking for unknown formats, as the article mentions. So the fallback WebP -> Jpeg -> img with src is pretty clean ime. Nothing bad happens either way!

Evergreen browsers have been quite responsive to supporting <picture> for a few years now too :)

(The caniuse link gives me 87% percent, could it be a font issue or the "site data" setting being on?)

 

Gonna double check for caniuse filters, I tell you that right after I checked.

I did not know the browser will fallback to the img tag if the picture tag is not supported. Thank you so much for sharing.

I guess I will still mention the picture tag coverage to be clearer :)

Ah, I meant the coverage percentage for picture, which caniuse puts at 87% and I thought the comment above said 81%.

I think if you mention the picture tag coverage, it is best to also include that it will fall back to the img tag (basically treating picture like a generic div). It is a common misconception that I see about using features, that we might avoid using them if they are not supported everywhere. In reality, they are often designed to progressively offer a better experience where supported, and picture is there in all evergreen browsers.

Mat Marquis, one of the people who worked on the spec back when it was established, goes over some of the history and progressive-enhancement decisions. The best I remember is in the ebook Image Performance, from A Book Apart. I'll see if I can find some other reference, it's a great read :)

 

Very well noticed! I completely not took into account the picture tag, which make this part irrelevant. Gonna rectify it thank you :)

Same feeling as you, I am very sad to see the slowness of LS in browsers...

 

Thanks for the nice article, and I love webp, but there's a fundamental point that we're missing here. WebP shaves off bytes at the cost of more computational demand. For users where the bottleneck is network bandwidth, this can do great. But for users especially on mid to low range mobile phones, the cpu is the bottleneck a lot of times and webp actually may perform worse than png or jpegs. This is something you might be interested to understand better - who are your users, and are they really benefitting from webp out there in the wild? The sad truth as it is, nothing in this world is for free :(

 

Awesome input Abhishek, thank you! I am understanding better the reason why webp is performing better in the bandwidth, I will definitively dig this and improve this article.

code of conduct - report abuse