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-transform] Unable to define better image quality than default #442

Open
insekticid opened this issue Aug 9, 2022 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@insekticid
Copy link

insekticid commented Aug 9, 2022

// CASE: dont make the image bigger than it was

you should allow to define image quality, sharp does have options.quality option, default is 80 and graphic blogs need maximum quality
https://sharp.pixelplumbing.com/api-output#parameters-7

https://ghost.org/docs/themes/assets/

// package.json

"config": {
    "image_sizes": {
        "xxs": {
            "width": 30,
            "quality": 100
        },
        "xs": {
            "width": 100,
            "quality": 100
        },
        "s": {
            "width": 300,
            "quality": 100
        },
        "m": {
            "width": 600,
            "quality": 100
        },
        "l": {
            "width": 1000,
            "quality": 100
        },
        "xl": {
            "width": 2000,
            "quality": 90
        }
    }
}

it looks like, that this simple option add will enable new quality option
...imageDimensionConfig

https://github.com/TryGhost/Ghost/blob/master/ghost/core/core/frontend/web/middleware/handle-image-sizes.js#L138

@daniellockyer daniellockyer added the enhancement New feature or request label Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants