{"slug": "libjxl", "name": "libjxl", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 5, "commenters": 17, "warners": 4, "score": 3.072, "rising": 5.0, "first": "2025-11-23", "latest": "2026-10-30", "why": "I like libjxl (and cjpegli) because they are really good at generating reasonably compact, high-quality images.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 5, "neutral": 4, "compare": 4, "warn": 4}, "spark": [0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2], "listed": true, "loved": [], "caveat": "", "short_quote": "I like libjxl (and cjpegli) because they are really good at generating reasonably compact, high-quality images.", "kind": "", "icon": true, "domain": null, "github_repo": "github.com/libjxl/libjxl", "official_url": "https://github.com/libjxl/libjxl", "pricing": "", "aliases": ["libjxl"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 804816144, "item_id": 50301009, "url": "https://news.ycombinator.com/item?id=50301009", "by": "cubefox", "date": "2026-10-30", "version": null, "stance": "recommend", "quote": "They are supported by JPEG XL (libjxl \u2265 0.11)", "excerpt": "They are supported by JPEG XL (libjxl \u2265 0.11), Chrome just doesn't support them yet. See https://issues.chromium.org/issues/476652050", "context": "", "use_case": "", "switched_from": "", "story": "H.264 Is Magic (2016)"}, {"id": 802116160, "item_id": 50132260, "url": "https://news.ycombinator.com/item?id=50132260", "by": "mdf", "date": "2026-10-17", "version": null, "stance": "recommend", "quote": "The reference encoder is, I believe, in the libjxl repository", "excerpt": "> We can now hopefully wait for better encoder. Or even better, participate in improving it. The reference encoder is, I believe, in the libjxl repository[1]. Much of the recent effort seems to be focused on the performance of the Rust version of the decoding library[2], which is quite understandable because of the fresh browser adoption. [1] https://github.com/libjxl/libjxl [2] https://jxl-rs-perf.lucaversari.it/?co", "context": "", "use_case": "JPEG XL reference encoder", "switched_from": "", "story": "JPEG XL vs. AVIF for web use-cases"}, {"id": 795075088, "item_id": 49692193, "url": "https://news.ycombinator.com/item?id=49692193", "by": "aidenn0", "date": "2026-09-14", "version": null, "stance": "recommend", "quote": "I like libjxl (and cjpegli) because they are really good at generating reasonably compact, high-quality images.", "excerpt": "How ergonomic are the modern AVIF encoders? I like libjxl (and cjpegli) because they are really good at generating reasonably compact, high-quality images. For every other image encoder I used I couldn't find one setting that would make compact, high-quality images across the gamut of inputs (e.g. things like comics that have extremely visible high-frequency content would look terrible at quality settings that looked", "context": "", "use_case": "compact high-quality image encoding", "switched_from": "", "story": "The case against JPEG XL"}, {"id": 791370912, "item_id": 49460682, "url": "https://news.ycombinator.com/item?id=49460682", "by": "danielheath", "date": "2026-08-27", "version": null, "stance": "recommend", "quote": "this seems to work alright?", "excerpt": "I did some quick testing with `cjxl --progressive`, different quality levels, and https://google.github.io/attention-center/ A 1536w / 2048h jpg selfie: 244kb Progressive JXL at quality=70: 151kb Loaded 7kb of that file: looked okay up to approx 130px wide. The first 18kb of that file was a suitable thumbnail up to approx 210px wide. The first 50kb looked okay up to 300px wide. The first 75kb looked okay up to 600px ", "context": "", "use_case": "JPEG XL encoding tests", "switched_from": "", "story": "Firefox 157 will include JPEG XL by default on all platforms"}, {"id": 791054240, "item_id": 49440890, "url": "https://news.ycombinator.com/item?id=49440890", "by": "farlight", "date": "2026-08-25", "version": null, "stance": "recommend", "quote": "cjxl / djxl do lossless transcode reliably when called with all defaults", "excerpt": "Not sure imagemagick supports lossless transcoding. This old discussion from 2021 mentions that it didn't (in 2021): https://github.com/dlemstra/Magick.NET/discussions/872 cjxl / djxl do lossless transcode reliably when called with all defaults (no arguments). Just re-checked: $ cjxl src.jpg out.jxl (some output) $ djxl out.jxl rev.jpg (more output) $ cmp src.jpg rev.jpg (no output: files identical)", "context": "", "use_case": "JPEG XL encoding tools", "switched_from": "", "story": "Firefox 157 will include JPEG XL by default on all platforms"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 803751184, "item_id": 50234449, "url": "https://news.ycombinator.com/item?id=50234449", "by": "da_chicken", "date": "2026-10-25", "version": null, "stance": "warn", "quote": "libjxl includes the brotli library, too, so it's also vulnerable to this.", "excerpt": "Well, don't worry. libjxl includes the brotli library, too, so it's also vulnerable to this. https://github.com/libjxl/libjxl/pull/5062/commits/269661f71827447a399081b7ff7c7b29cc1de858", "context": "", "use_case": "", "switched_from": "", "story": "Broccoli2Shell: Brotli decoder RCE in Node.js, Python and more"}, {"id": 799867056, "item_id": 49991691, "url": "https://news.ycombinator.com/item?id=49991691", "by": "innocent_name", "date": "2026-10-07", "version": null, "stance": "warn", "quote": "libjxl had notorious bugs that would've on par with webp exploit, if present in browser", "excerpt": "Wasn't it due to poor security? libjxl had notorious bugs that would've on par with webp exploit, if present in browser: https://security.snyk.io/vuln/?search=libjxl I remember Project Zero cautioning Google's browser team against adding insecure decoders/encoders.", "context": "", "use_case": "", "switched_from": "", "story": "Shipping JPEG XL in Chrome"}, {"id": 742496880, "item_id": 46406055, "url": "https://news.ycombinator.com/item?id=46406055", "by": "culi", "date": "2025-12-27", "version": null, "stance": "warn", "quote": "the reference decoder which has some major security flaws", "excerpt": "Yes exactly. Voting for the 2026 focus areas is happening now btw. The next year's interop usually releases around February https://webkit.org/blog/17320/submit-your-ideas-for-interop-2026/ And yes JPEG XL support is often the most requested feature and the major browsers have responded. Google and Firefox are both willing to take it on but Firefox's biggest concern is with the reference decoder which has some major ", "context": "", "use_case": "", "switched_from": "", "story": "This PNG shows a different version when opened in Chrome than in an image viewer"}, {"id": 736568320, "item_id": 46035520, "url": "https://news.ycombinator.com/item?id=46035520", "by": "kllrnohj", "date": "2025-11-24", "version": null, "stance": "warn", "quote": "which completely fails to understand the problem space entirely", "excerpt": "> and generally its HDR support is much better than AVIF Not anymore. JPEG had the best HDR support with ISO 21496-1 weirdly enough, but AVIF also just recently got that capability with 1.2 ( https://aomedia.org/blog%20posts/Libavif-Improves-Support-for-HDR-Imagery/ ). The last discussion in libjxl about this was seemingly taking the stance it wasn't necessary since JXL has \"native HDR\" which completely fails to unde", "context": "", "use_case": "", "switched_from": "", "story": "Chrome Jpegxl Issue Reopened"}]}], "who": [], "tags": [], "use_cases": ["jpeg xl reference encoder", "jpeg xl encoding", "compact high-quality image encoding", "jpeg xl encoding tests", "jpeg xl encoding tools", "jpeg xl decoding"], "compared": [{"slug": "jxl-rs", "name": "jxl-rs", "co": 3, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=49437946", "title": "Firefox 157 will include JPEG XL by default on all platforms", "mentions": 4}, {"url": "https://news.ycombinator.com/item?id=49991227", "title": "Shipping JPEG XL in Chrome", "mentions": 3}, {"url": "https://news.ycombinator.com/item?id=50120224", "title": "JPEG XL vs. AVIF for web use-cases", "mentions": 3}, {"url": "https://news.ycombinator.com/item?id=46021179", "title": "Google Revisits JPEG XL in Chromium After Earlier Removal", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=50291054", "title": "H.264 Is Magic (2016)", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=50219177", "title": "Broccoli2Shell: Brotli decoder RCE in Node.js, Python and more", "mentions": 1}], "sentiment_by_month": {"2025-11": {"neutral": 2, "warn": 1}, "2025-12": {"neutral": 1, "warn": 1}, "2026-01": {}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {}, "2026-07": {}, "2026-08": {"compare": 2, "recommend": 2}, "2026-09": {"recommend": 1}, "2026-10": {"warn": 2, "compare": 2, "neutral": 1, "recommend": 2}}, "versions": [], "version_unnamed": 0, "quotes": [{"id": 804816144, "item_id": 50301009, "url": "https://news.ycombinator.com/item?id=50301009", "by": "cubefox", "date": "2026-10-30", "version": null, "stance": "recommend", "quote": "They are supported by JPEG XL (libjxl \u2265 0.11)", "excerpt": "They are supported by JPEG XL (libjxl \u2265 0.11), Chrome just doesn't support them yet. See https://issues.chromium.org/issues/476652050", "context": "", "use_case": "", "switched_from": "", "story": "H.264 Is Magic (2016)"}, {"id": 803751184, "item_id": 50234449, "url": "https://news.ycombinator.com/item?id=50234449", "by": "da_chicken", "date": "2026-10-25", "version": null, "stance": "warn", "quote": "libjxl includes the brotli library, too, so it's also vulnerable to this.", "excerpt": "Well, don't worry. libjxl includes the brotli library, too, so it's also vulnerable to this. https://github.com/libjxl/libjxl/pull/5062/commits/269661f71827447a399081b7ff7c7b29cc1de858", "context": "", "use_case": "", "switched_from": "", "story": "Broccoli2Shell: Brotli decoder RCE in Node.js, Python and more"}, {"id": 802190240, "item_id": 50136890, "url": "https://news.ycombinator.com/item?id=50136890", "by": "yhjc2692", "date": "2026-10-18", "version": null, "stance": "neutral", "quote": "libjxl produces something like 5% larger files, but at 3-6x faster encoding speed", "excerpt": "One thing you can try is reducing the encoder effort: libjxl produces something like 5% larger files, but at 3-6x faster encoding speed, if you turn it down from 7 (default) to 4. (The typical compression rate benefit vs. JPEG is 30-60%.) Shameless plug: if you have GPUs in your server, you can put them to use to make it faster! https://github.com/yunho-c/gjxl (Granted, the speed improvement at lower efforts aren't a", "context": "", "use_case": "", "switched_from": "", "story": "Shipping JPEG XL in Chrome"}, {"id": 802130368, "item_id": 50133148, "url": "https://news.ycombinator.com/item?id=50133148", "by": "GrantMoyer", "date": "2026-10-17", "version": null, "stance": "compare", "quote": "The newer benchmark does find an image where libjxl wins on file size", "excerpt": "The benchmark[1] (HN discussion [2]) I read from about 2.5 years ago came to roughly the opposite conclusion. JPEG XL dominated practically all other image formats on compressed size and encoding time. Superficially, that benchmark and this one seem to be taking similar measurements. They both measure encoded size versus encoding time versus perceptual quality metrics, although they present the data on plots with dif", "context": "", "use_case": "", "switched_from": "", "story": "JPEG XL vs. AVIF for web use-cases"}, {"id": 802116160, "item_id": 50132260, "url": "https://news.ycombinator.com/item?id=50132260", "by": "mdf", "date": "2026-10-17", "version": null, "stance": "recommend", "quote": "The reference encoder is, I believe, in the libjxl repository", "excerpt": "> We can now hopefully wait for better encoder. Or even better, participate in improving it. The reference encoder is, I believe, in the libjxl repository[1]. Much of the recent effort seems to be focused on the performance of the Rust version of the decoding library[2], which is quite understandable because of the fresh browser adoption. [1] https://github.com/libjxl/libjxl [2] https://jxl-rs-perf.lucaversari.it/?co", "context": "", "use_case": "JPEG XL reference encoder", "switched_from": "", "story": "JPEG XL vs. AVIF for web use-cases"}, {"id": 801949921, "item_id": 50121870, "url": "https://news.ycombinator.com/item?id=50121870", "by": "yhjc2692", "date": "2026-10-16", "version": null, "stance": "neutral", "quote": "libjxl's slow speed at efforts >7 is primarily due to an iterative evaluation-optimization loop", "excerpt": "> libjxl's maximum effort is very slow. It produces files 2\u20137% smaller than its default for photos, and ~25% smaller for the screenshot and illustration, but takes 9\u201346 seconds, which is 50\u2013180x as long as its default. jixel gets the same results in a couple of seconds. libjxl's slow speed at efforts >7 is primarily due to an iterative evaluation-optimization loop of a perceptual error metric called Butteraugli (by t", "context": "", "use_case": "JPEG XL encoding", "switched_from": "", "story": "JPEG XL vs. AVIF for web use-cases"}, {"id": 799909153, "item_id": 49994322, "url": "https://news.ycombinator.com/item?id=49994322", "by": "mort96", "date": "2026-10-07", "version": null, "stance": "compare", "quote": "jxl-rs (Rust) vs libjxl (C++)", "excerpt": "Here's a benchmark over time of jxl-rs (Rust) vs libjxl (C++) across both memory usage and performance: https://jxl-rs-perf.lucaversari.it/. I'm inclined to trust that it's a decent benchmark since it's from Luca Versari, a key person in the original JPEG XL standardization effort and development of libjxl, and is now the main developer of jxl-rs. Seems to be between a little and a lot faster in almost all of the tes", "context": "", "use_case": "", "switched_from": "", "story": "Shipping JPEG XL in Chrome"}, {"id": 799867056, "item_id": 49991691, "url": "https://news.ycombinator.com/item?id=49991691", "by": "innocent_name", "date": "2026-10-07", "version": null, "stance": "warn", "quote": "libjxl had notorious bugs that would've on par with webp exploit, if present in browser", "excerpt": "Wasn't it due to poor security? libjxl had notorious bugs that would've on par with webp exploit, if present in browser: https://security.snyk.io/vuln/?search=libjxl I remember Project Zero cautioning Google's browser team against adding insecure decoders/encoders.", "context": "", "use_case": "", "switched_from": "", "story": "Shipping JPEG XL in Chrome"}, {"id": 795075088, "item_id": 49692193, "url": "https://news.ycombinator.com/item?id=49692193", "by": "aidenn0", "date": "2026-09-14", "version": null, "stance": "recommend", "quote": "I like libjxl (and cjpegli) because they are really good at generating reasonably compact, high-quality images.", "excerpt": "How ergonomic are the modern AVIF encoders? I like libjxl (and cjpegli) because they are really good at generating reasonably compact, high-quality images. For every other image encoder I used I couldn't find one setting that would make compact, high-quality images across the gamut of inputs (e.g. things like comics that have extremely visible high-frequency content would look terrible at quality settings that looked", "context": "", "use_case": "compact high-quality image encoding", "switched_from": "", "story": "The case against JPEG XL"}, {"id": 791370912, "item_id": 49460682, "url": "https://news.ycombinator.com/item?id=49460682", "by": "danielheath", "date": "2026-08-27", "version": null, "stance": "recommend", "quote": "this seems to work alright?", "excerpt": "I did some quick testing with `cjxl --progressive`, different quality levels, and https://google.github.io/attention-center/ A 1536w / 2048h jpg selfie: 244kb Progressive JXL at quality=70: 151kb Loaded 7kb of that file: looked okay up to approx 130px wide. The first 18kb of that file was a suitable thumbnail up to approx 210px wide. The first 50kb looked okay up to 300px wide. The first 75kb looked okay up to 600px ", "context": "", "use_case": "JPEG XL encoding tests", "switched_from": "", "story": "Firefox 157 will include JPEG XL by default on all platforms"}, {"id": 791054240, "item_id": 49440890, "url": "https://news.ycombinator.com/item?id=49440890", "by": "farlight", "date": "2026-08-25", "version": null, "stance": "recommend", "quote": "cjxl / djxl do lossless transcode reliably when called with all defaults", "excerpt": "Not sure imagemagick supports lossless transcoding. This old discussion from 2021 mentions that it didn't (in 2021): https://github.com/dlemstra/Magick.NET/discussions/872 cjxl / djxl do lossless transcode reliably when called with all defaults (no arguments). Just re-checked: $ cjxl src.jpg out.jxl (some output) $ djxl out.jxl rev.jpg (more output) $ cmp src.jpg rev.jpg (no output: files identical)", "context": "", "use_case": "JPEG XL encoding tools", "switched_from": "", "story": "Firefox 157 will include JPEG XL by default on all platforms"}, {"id": 791048529, "item_id": 49440533, "url": "https://news.ycombinator.com/item?id=49440533", "by": "Snafuh", "date": "2026-08-25", "version": null, "stance": "compare", "quote": "", "excerpt": "Luca Versari, one of the devs between both libraries, has a performance dashboard to compare performance between the two https://jxl-rs-perf.lucaversari.it/ jxl-rs started to outperform the C++ library 2 months ago.", "context": "", "use_case": "", "switched_from": "", "story": "Firefox 157 will include JPEG XL by default on all platforms"}, {"id": 791019985, "item_id": 49438749, "url": "https://news.ycombinator.com/item?id=49438749", "by": "concinds", "date": "2026-08-25", "version": null, "stance": "compare", "quote": "I also wonder if anyone's done benchmark comparisons between both libs.", "excerpt": "With both Firefox and Chromium using jxl-rs (Rust-based), I wonder what Apple will do about the libjxl (C++) they already shipped. I know they're doing some memory-safety with Swift, but are they shipping any Rust in their platforms so far? I also wonder if anyone's done benchmark comparisons between both libs. -- Also, I was under the impression that after backtracking, Chromium was relying on Mozilla to come up wit", "context": "", "use_case": "JPEG XL decoding", "switched_from": "", "story": "Firefox 157 will include JPEG XL by default on all platforms"}, {"id": 742496880, "item_id": 46406055, "url": "https://news.ycombinator.com/item?id=46406055", "by": "culi", "date": "2025-12-27", "version": null, "stance": "warn", "quote": "the reference decoder which has some major security flaws", "excerpt": "Yes exactly. Voting for the 2026 focus areas is happening now btw. The next year's interop usually releases around February https://webkit.org/blog/17320/submit-your-ideas-for-interop-2026/ And yes JPEG XL support is often the most requested feature and the major browsers have responded. Google and Firefox are both willing to take it on but Firefox's biggest concern is with the reference decoder which has some major ", "context": "", "use_case": "", "switched_from": "", "story": "This PNG shows a different version when opened in Chrome than in an image viewer"}, {"id": 737767520, "item_id": 46110470, "url": "https://news.ycombinator.com/item?id=46110470", "by": "aw1621107", "date": "2025-12-01", "version": null, "stance": "neutral", "quote": "According to tokei, the lib/ directory from the reference implementation", "excerpt": "According to tokei, the lib/ directory from the reference implementation [0] has 93821 lines of C++ code and 22164 lines of \"C Header\" (which seems to be a mix of C++ headers, C headers, and headers that are compatible with both C and C++). The tools/ directory adds 16314 lines of C++ code and 1952 lines of \"C Header\". So at least if GP was talking about libjxl \"100K+\" would be more accurate. [0]: https://github.com/", "context": "", "use_case": "JPEG XL reference implementation", "switched_from": "", "story": "Google unkills JPEG XL?"}, {"id": 736576976, "item_id": 46036061, "url": "https://news.ycombinator.com/item?id=46036061", "by": "gsnedders", "date": "2025-11-24", "version": null, "stance": "neutral", "quote": "currently I believe this is libjxl \u2014 or a fork thereof", "excerpt": "The second link isn't applicable to Apple's WebKit ports \u2014 it's entirely built via Xcode. https://github.com/WebKit/WebKit/blob/39386f4547897c89c510d0eeeecddc5efb5d6d13/Source/WebCore/Configurations/WebCore.xcconfig#L29-L34 defines USE_JPEGXL only for macOS < 14 (which aren't actually supported any more!). All the in-tree JPEG XL support, e.g., https://github.com/WebKit/WebKit/blob/39386f4547897c89c510d0eeeecddc5efb5", "context": "", "use_case": "JPEG XL codec", "switched_from": "", "story": "Google Revisits JPEG XL in Chromium After Earlier Removal"}, {"id": 736568320, "item_id": 46035520, "url": "https://news.ycombinator.com/item?id=46035520", "by": "kllrnohj", "date": "2025-11-24", "version": null, "stance": "warn", "quote": "which completely fails to understand the problem space entirely", "excerpt": "> and generally its HDR support is much better than AVIF Not anymore. JPEG had the best HDR support with ISO 21496-1 weirdly enough, but AVIF also just recently got that capability with 1.2 ( https://aomedia.org/blog%20posts/Libavif-Improves-Support-for-HDR-Imagery/ ). The last discussion in libjxl about this was seemingly taking the stance it wasn't necessary since JXL has \"native HDR\" which completely fails to unde", "context": "", "use_case": "", "switched_from": "", "story": "Chrome Jpegxl Issue Reopened"}, {"id": 736363808, "item_id": 46022738, "url": "https://news.ycombinator.com/item?id=46022738", "by": "JimDabell", "date": "2025-11-23", "version": null, "stance": "neutral", "quote": "libjxl:", "excerpt": "libjxl: https://github.com/libjxl/libjxl https://github.com/WebKit/WebKit/blob/7879cb55638ec765dc033dd9ba1a11bc3c789efa/Tools/jhbuild/jhbuild-minimal.modules#L244C8-L244C14", "context": "", "use_case": "", "switched_from": "", "story": "Google Revisits JPEG XL in Chromium After Earlier Removal"}]}