diff options
author | 2023-10-25 22:01:43 +0200 | |
---|---|---|
committer | 2023-10-25 16:01:43 -0400 | |
commit | 8c3d4a859aec0b94cabd14cc56b5bf3e5e973e36 (patch) | |
tree | dc5223a084e98d103b797022841098f528c25a94 | |
parent | e99586787b6b53d35daf0195ab9835326cea464a (diff) | |
download | astro-8c3d4a859aec0b94cabd14cc56b5bf3e5e973e36.tar.gz astro-8c3d4a859aec0b94cabd14cc56b5bf3e5e973e36.tar.zst astro-8c3d4a859aec0b94cabd14cc56b5bf3e5e973e36.zip |
fix noop overwrite image service regression (#8880)
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
-rw-r--r-- | .changeset/witty-waves-rhyme.md | 5 | ||||
-rw-r--r-- | packages/astro/src/integrations/index.ts | 10 |
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; }, |