Enhance image rendering for clearer display

- Add `image-rendering: pixelated` to ensure sharpness of images in Chromium-based browsers

Avoid using `Sharp` service since it's not configurable. It overcompresses images, reducing their quality. Preserving image quality is essential for tutorials and especially for theme gallery.
This commit is contained in:
2025-08-19 06:17:56 +02:00
parent d705233441
commit 44a7c24e64
2 changed files with 11 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
// @ts-check
import { defineConfig } from "astro/config";
import { defineConfig, passthroughImageService } from 'astro/config';
import starlight from "@astrojs/starlight";
import startlightBlog from "starlight-blog";
import starlightScrollToTop from "starlight-scroll-to-top";
@@ -100,5 +100,8 @@ export default defineConfig({
})
]
})
]
],
image: {
service: passthroughImageService(),
},
});