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

Compressing images results in larger size #370

Open
noone-silent opened this issue Jul 29, 2024 · 1 comment
Open

Compressing images results in larger size #370

noone-silent opened this issue Jul 29, 2024 · 1 comment
Labels
question Further information is requested

Comments

@noone-silent
Copy link

Some image processing can result in larger files:

grafik

Same image with compress:

grafik

@risu729
Copy link
Owner

risu729 commented Jul 30, 2024

Thanks for reporting!

I'm actually not sure about its cause since it should be the issue with sharp.
lovell/sharp#3589 might be related, so could you try setting the config below?
It overrides the default chromaSubsampling value used by astro-better-image-service and uses the sharp's default settings.

import betterImageService from "astro-better-image-service";
import { defineConfig } from "astro/config";

export default defineConfig({
	integrations: [
		betterImageService({
			sharp: {
				avif: {
					chromaSubsampling: undefined
				},
			},
		}),
	],
});

@risu729 risu729 added the question Further information is requested label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants