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

Support quality property #171

Closed
inquiztr opened this issue Sep 3, 2023 · 3 comments
Closed

Support quality property #171

inquiztr opened this issue Sep 3, 2023 · 3 comments

Comments

@inquiztr
Copy link

inquiztr commented Sep 3, 2023

Nextsj image component allows to define a quality setting. In my case the default is 75, but I am trying to overide for an image i will be using as a background image that could use a higher quality setting.
However passing in a Quality parameter to ExportedImage is causing a complaint during build and linting.

<ExportedImage
    src={bg}
    alt=""
    className={styles.heroBG}
    fill={true}
    sizes="100vw"
    placeholder="blur"
    priority={true}
    quality="90"
    style={{ objectFit: 'cover' }}
/>
@inquiztr inquiztr changed the title support quality property Support quality property Sep 3, 2023
@Niels-IO
Copy link
Owner

Niels-IO commented Sep 4, 2023

Hi @inquiztr,

The error comes up purposefully as this library cannot support the quality property on an per-image basis.

In order for it to be possible, the library would have to scan all code files of the project to look for which image uses which quality property (if any).

Cheers,
Niels

@inquiztr
Copy link
Author

inquiztr commented Sep 5, 2023

@Niels-IO thank you for the feedback. I appreciate your efforts and this library.
I think there should be some mention in the documentation as I just assumed all image component properties were supported as you mention your library wraps the Image component.
I also see the document mentions using layout="responsive" property but I believe as of Next13 layout property has been removed.

@Niels-IO
Copy link
Owner

Hi @inquiztr,

Thank you very much for the comments. I adapted the README to state the issue around the quality prop.

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