Skip to content
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

Image Quality on per image base #79

Closed
Fritze1602 opened this issue Dec 7, 2022 · 4 comments
Closed

Image Quality on per image base #79

Fritze1602 opened this issue Dec 7, 2022 · 4 comments

Comments

@Fritze1602
Copy link

Hi, first of all thank you for your amazing library and the perfect docs.
I have a feature request. I would love to have the image quality as a an (optional) prop on . I wonderf if this would be possible.
Many thanks in advance and kind regards

@Niels-IO
Copy link
Owner

Niels-IO commented Dec 7, 2022

Hi @Fritze1602

Thank you very much for your kind words.
It wouldn't be possible to pass the quality as a prop as the module does not look at the code base. It only takes the images from the image folder and uses them to do the image resizing operation.

The only way that I could think this would be possible, if the hash file stores the requested quality as an argument per image. At first this would be the default and then you could change it here.

I don't think this would be a particular elegant solution though.

Can I ask why you want to steer the quality prop on a per image basis?

@Fritze1602
Copy link
Author

Fritze1602 commented Dec 8, 2022

Hi. Thanks a million for your kind reply.
Ohoh. That doesn't sound like an easy solution or a quick win. I like this feature (next/image) for projects with completely different images/qualities (inputs). I have found these "deliveries" often on architecture projects. Some images with same dimensions 1,5MB others 0,4MB. So the per image solution becomes very handy to avoid a whole step of image/pre-processing. This can be done on the fly or via CMS..
So I have created my component library that makes heavy use of the Next/Image Quality feature, and I want to use it in static export projects with your amazing library as well.
Sorry for my English btw. I hope my "suggestion" and the idea became clear anyways.

@Niels-IO
Copy link
Owner

Niels-IO commented Dec 8, 2022

Hi @Fritze1602

Thanks for the explanation! I understand your point.
I will put this feature on the backburner. Maybe I have a better idea on how to do it in the future.

Cheers
Niels

@Niels-IO Niels-IO closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2022
@Fritze1602
Copy link
Author

Thanks a million for this and your thoughts about it. I hope I will increase my abilities in next js and your fantastic library in the nearer future, so I hopefully come up with a few ideas too. At the moment I am simply not good enough... .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants