Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1.43 KB

File metadata and controls

36 lines (26 loc) · 1.43 KB
title Could not find Sharp.
i18nReady true
githubURL https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts

import DontEditWarning from '~/components/DontEditWarning.astro'

MissingSharp: Could not find Sharp. Please install Sharp (sharp) manually into your project or migrate to another image service.

What went wrong?

Sharp is the default image service used for astro:assets. When using a strict package manager like pnpm, Sharp must be installed manually into your project in order to use image processing.

If you are not using astro:assets for image processing, and do not wish to install Sharp, you can configure the following passthrough image service that does no processing:

import { defineConfig, passthroughImageService } from "astro/config";
export default defineConfig({
 image: {
   service: passthroughImageService(),
 },
});

See Also: