summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/witty-waves-rhyme.md5
-rw-r--r--packages/astro/src/integrations/index.ts10
2 files changed, 5 insertions, 10 deletions
diff --git a/.changeset/witty-waves-rhyme.md b/.changeset/witty-waves-rhyme.md
new file mode 100644
index 000000000..67e30b8db
--- /dev/null
+++ b/.changeset/witty-waves-rhyme.md
@@ -0,0 +1,5 @@
+---
+'astro': minor
+---
+
+Moves the logic for overriding the image service out of core and into adapters. Also fixes a regression where a valid `astro:assets` image service configuration could be overridden.
diff --git a/packages/astro/src/integrations/index.ts b/packages/astro/src/integrations/index.ts
index 268721025..4c527cea3 100644
--- a/packages/astro/src/integrations/index.ts
+++ b/packages/astro/src/integrations/index.ts
@@ -238,16 +238,6 @@ export async function runHookConfigDone({
);
}
}
- if (!validationResult.assets) {
- logger.warn(
- 'astro',
- `The selected adapter ${adapter.name} does not support image optimization. To allow your project to build with the original, unoptimized images, the image service has been automatically switched to the 'noop' option. See https://docs.astro.build/en/reference/configuration-reference/#imageservice`
- );
- settings.config.image.service = {
- entrypoint: 'astro/assets/services/noop',
- config: {},
- };
- }
}
settings.adapter = adapter;
},