Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lossless prop to next/image component #32106

Closed
styfle opened this issue Dec 4, 2021 · 5 comments
Closed

Add lossless prop to next/image component #32106

styfle opened this issue Dec 4, 2021 · 5 comments
Assignees
Labels
Image (next/image) Related to Next.js Image Optimization.

Comments

@styfle
Copy link
Member

styfle commented Dec 4, 2021

Describe the feature you'd like to request

Some images have poor quality from lossy compression when converting to webp or avif formats, even when quality={100}.

In particular, gradients suffer from Color Banding.

Examples:

Describe the solution you'd like

This can be resolved with a new prop, lossless={true}, that can be used to enable lossless compression.

Its supported by many tools already such as:

Describe alternatives you've considered

An alternative is to use q={100} to indicate lossless which seems to be how cloudinary does it.

This would be much easier to implement than adding a new prop, but might be a breaking change.

@styfle styfle added kind: story Image (next/image) Related to Next.js Image Optimization. labels Dec 4, 2021
@styfle styfle self-assigned this Dec 4, 2021
@adrianmg
Copy link

adrianmg commented Dec 4, 2021

Some more information: #28614 (comment)

I'm not sure what's being used behind the scenes but cwebp offers two similar flags -lossless and near_lossless <int> (0-100) to adjust things as needed. Having one of them will probably be enough to avoid running into banding issues 👍

@Brooooooklyn
Copy link
Contributor

@predaytor
Copy link

Any updates? Using the Astro framework with Vercel Image Optimization (/_vercel?image=). Images regardless of the format (avif, webp) and quality (90-100) look desaturated and have the artifacts described above. This is unacceptable. What's the point of small image sizes if they look terrible? They need to do something about compression.

@aaronpurewal

This comment has been minimized.

@trieu-hphuc96

This comment has been minimized.

@vercel vercel locked and limited conversation to collaborators Apr 17, 2024
@balazsorban44 balazsorban44 converted this issue into discussion #64639 Apr 17, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Image (next/image) Related to Next.js Image Optimization.
Projects
None yet
Development

No branches or pull requests

6 participants