-
-
Notifications
You must be signed in to change notification settings - Fork 52
The currently selected adapter @astrojs/cloudflare
is not compatible with the image service "Sharp".
#191
Comments
It's reproduced and should be fixed. But it is not breaking anything, it's just a warning. |
I'm also getting this error with Astro + CloudFlare adapter and the passthrough image service, assuming this error shouldnt even be possible if im not using sharp? import cloudflare from "@astrojs/cloudflare";
import tailwind from "@astrojs/tailwind";
import { defineConfig, passthroughImageService } from "astro/config";
import sitemap from "@astrojs/sitemap";
export default defineConfig({
output: "hybrid",
integrations: [tailwind(), sitemap()],
adapter: cloudflare({ imageService: "cloudflare" }),
image: { service: passthroughImageService() },
}); |
The error is always there. It doesn’t break anything. |
Yeah it's a warning, which we would like to hide, but it's a core upstream change, so it might take some time. Still we appreciate all the reports and feedback |
This should be fixed in 5.0, see https://5-0-0-beta.docs.astro.build/en/guides/upgrade-to/v5/#changed-properties-on-supportedastrofeatures-adapter-api |
It is not fixed in 5.0. It's a problem with the cloudflare adapter. |
I think that's because the adapter is not using the new shape yet, @alexanderniebuhr may confirm |
Yes we still need to update some things |
With Astro 5.0.3 and @astrojs/node v9.0.0, there's a similar warning for the node adapter:
|
Can you update a dedicated issue for it? That would help thank you! |
This is not fixed even with the latest release. |
Using Astro 5.1.6 and @astrojs/cloudflare 12.2.0 I now get not one but two warnings of this when running the dev server:
(the project has no |
@Uninen the warning you get is expected. |
@nlnw can you show the warning you get? |
Umm, okay, that's weird. Is there a way to deactivate or filter out these warnings? They are noise in the dev server output. |
@alexanderniebuhr Why is it expected if the settings are telling it not to use sharp? |
The 'compile' option uses sharp, if switching to a different option which doesn't use sharp, the warning should go away. |
But with it set to compile.. So the warning says to use compile when you already are using compile. It also shows when using cloudflare passthrough |
@ekwoka as I said for 'compile' it is correct to have a warning, maybe we can tweak the wording a bit. For 'passtrough' it is not expected, I need to look into that case. |
Using Astro 5.2.3 and @astrojs/cloudflare 12.2.1 12:06:09 [WARN] [config] The adapter @astrojs/cloudflare has limited support for "sharp". Certain features may not work as expected.
12:06:09 [WARN] [adapter] Cloudflare does not support sharp. You can use the `compile` image service to compile images at build time. It will not work for any on-demand rendered images. in astro.config adapter: cloudflare({
platformProxy: {
enabled: true,
configPath: "wrangler.toml",
},
}),
vite: {
ssr: {
external: ['node:async_hooks'],
},
}, What do we need to modify? Will it be necessary to work with Cloudflare's Image Optimization? |
Astro Info
Describe the Bug
The currently selected adapter
@astrojs/cloudflare
is not compatible with the image service "Sharp".What's the expected result?
I have set my configuration to use 'compile'. Which according to the docs. Uses Astro’s default service (sharp), but only on pre-rendered routes at build time. During SSR for pages rendered on-demand, all astro:assets features are disabled.
Link to Minimal Reproducible Example
https://github.com/hkbertoson/sleepy-spiral
Participation
The text was updated successfully, but these errors were encountered: