Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The currently selected adapter @astrojs/cloudflare is not compatible with the image service "Sharp". #191

Open
1 task
hkbertoson opened this issue Mar 19, 2024 · 4 comments
Assignees
Labels
- P2: nice to have Not breaking anything but nice to have (priority) pkg: cloudflare

Comments

@hkbertoson
Copy link

Astro Info

Astro                    v4.4.13
Node                     v20.11.0
System                   macOS (arm64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/cloudflare
Integrations             none

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

  • I am willing to submit a pull request for this issue.
@alexanderniebuhr alexanderniebuhr added the - P2: nice to have Not breaking anything but nice to have (priority) label Mar 20, 2024
@alexanderniebuhr
Copy link
Member

It's reproduced and should be fixed. But it is not breaking anything, it's just a warning.

@alexanderniebuhr alexanderniebuhr added this to the Cloudflare v11.1 milestone Jun 22, 2024
@danawoodman
Copy link

danawoodman commented Aug 14, 2024

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() },
});

@hkbertoson
Copy link
Author

The error is always there. It doesn’t break anything.

@alexanderniebuhr
Copy link
Member

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

@alexanderniebuhr alexanderniebuhr self-assigned this Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority) pkg: cloudflare
Projects
None yet
Development

No branches or pull requests

4 participants