sveltejs / sveltejs/kit

Add `jxl` support to `enhanced-img`

Open
#16,082 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pkg:enhanced-img
Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the problem

Not sure if this is the correct repo for this. There are many formats included in the @sveltejs/enhanced-img but there is a new image standard that is making it's way out there: JPEG XL. It is really early doors with only safari supporting still images and the rest supporting it behind a flag but it is better image format then AVIF/PNG/JPG so if we could get support for it at some point that would be incredible.

Describe the proposed solution

Make the most preferable format for the enhanced img be JXL since it supports transparency, lossless quality and smallest file size.

Alternatives considered

No response

Importance

nice to have

Additional Information

It is really early so i understand not wanting this added just yet, but if you do, i will be happy to work on this given your go ahead

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the @sveltejs/enhanced-img entry point and its existing AVIF, PNG, and JPG format-selection logic. Check how JPEG XL support and browser availability should affect the preferred format, and consider the work complete when enhanced-img consistently selects JXL where supported without breaking existing formats.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.