Skip to content

Commit

Permalink
fix noop overwrite image service regression (#8880)
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
  • Loading branch information
alexanderniebuhr and sarah11918 committed Oct 25, 2023
1 parent e995867 commit 8c3d4a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-waves-rhyme.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 0 additions & 10 deletions packages/astro/src/integrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand Down

0 comments on commit 8c3d4a8

Please sign in to comment.