https://github.com/niutech/jxl.js Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + For + Enterprise + Teams + Startups + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} niutech / jxl.js Public * Notifications * Fork 6 * Star 83 JPEG XL decoder in JavaScript using WebAssembly (WASM) niutech.github.io/jxl.js/ License Apache-2.0 license 83 stars 6 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights niutech/jxl.js This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/n] Use Git or checkout with SVN using the web URL. [gh repo clone niutec] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @niutech niutech Set prefetch priority high ... 9197301 Nov 22, 2022 Set prefetch priority high 9197301 Git stats * 15 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time img Move images to subfolder Nov 21, 2022 LICENSE Initial commit Nov 15, 2022 README.md Update README Nov 17, 2022 index.html Set prefetch priority high Nov 22, 2022 jxl.js Remove unneeded async Nov 21, 2022 jxl.min.js Remove unneeded async Nov 21, 2022 jxl_dec.js Decode to cached JPEG images using offscreen canvas if available Nov 17, 2022 jxl_dec.wasm Initial commit Nov 15, 2022 package.json Add package.json Nov 22, 2022 View code JXL.js Usage How it works See the demo License README.md JXL.js This is a JPEG XL decoder in JavaScript using WebAssembly implementation from the Squoosh app running in Web Worker. Usage Just insert your JPEG XL images to your HTML document as usual: ... and append the minified JXL.js script to the of your web page: That's it! How it works JXL.js uses Mutation Observer to watch for tags being added to the DOM as well as CSS background images and it decodes them as they appear using WebAssembly decoder in Web Worker. Then the JPEG XL image data is transcoded into JPEG image and cached using Cache API for faster subsequent page views. The transcoding is performed using Offscreen Canvas in Web Worker for jank-free performance, if available. See the demo License (c) 2022 Jerzy Glowacki and Squoosh Developers under Apache 2.0 License. About JPEG XL decoder in JavaScript using WebAssembly (WASM) niutech.github.io/jxl.js/ Topics wasm webassmebly jpeg-xl Resources Readme License Apache-2.0 license Stars 83 stars Watchers 2 watching Forks 6 forks Releases No releases published Packages 0 No packages published Languages * JavaScript 81.6% * HTML 18.4% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.