mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
fix noop overwrite image service regression (#8880)
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
This commit is contained in:
parent
e99586787b
commit
8c3d4a859a
2 changed files with 5 additions and 10 deletions
5
.changeset/witty-waves-rhyme.md
Normal file
5
.changeset/witty-waves-rhyme.md
Normal file
|
@ -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.
|
|
@ -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;
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue