On the fly WebP decoding using WASM and a Service Worker

TPAC WebAssembly presentation

Status

Decoding WebP images in a Service Worker on Chrome, using Offscreen Canvas
4th image decoded in main context by WebAssembly in Chrome
4th image decoded in main context by WebAssembly in Firefox

Creating the library

My mini WebP decoding library to be compiled using Emscripten to WASM
A simple CMakeLists.txt file building my webp decoding library
Finding the right command needed to build the wasm module was not straight forward

Approach and complications

We want our Service Worker to be an ES module, but this isn't working yet :-(

How to use

A reminder

about:flags in Chrome

An update

Firefox can now render WebP images via a Service Worker and with the help of Web Assembly!

--

--

--

Chromium/Blink, WebKit and Web Platform hacker

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Calculating wireless transmission rates and file sizes of voltage signals

How to get a job in IT without a degree — talking with Bartek Igielski, SD’s Head of Front-End…

Optimize Compute Cost using Burstable Instance on Oracle Cloud

Oracle Virtual Cloud Network (VCN) Local Peering — Part1

Codemotion Milan Shares how you can Start and Progress Your Career.

Detecting Bird Sounds with Create ML, CoreML3, and Skafos: Part 2

The Meta Description doesn’t help Google ranking, but helps CTR

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kenneth Christiansen

Kenneth Christiansen

Chromium/Blink, WebKit and Web Platform hacker

More from Medium

PureScript: A Haskell-like Language that Compiles to JavaScript

JavaScript Framework vs Library

Jest tests failed when using csv-parse/sync library

Solving IPv4 Exhaustion with JavaScript