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

Sharp image optimization support #2

Open
Adam-Collier opened this issue Sep 17, 2023 · 1 comment
Open

Sharp image optimization support #2

Adam-Collier opened this issue Sep 17, 2023 · 1 comment

Comments

@Adam-Collier
Copy link

I came across this adapter today thanks to Fred via Twitter https://x.com/FredKSchott/status/1703070739958825007?s=20 and for the best part it's working great! If you navigate from the homepage to /bookmarks (Static to SSR'd page) on the below links you can compare the difference (the serverless cold start is noticeable on first navigation)

Serverless deployment:
https://www.adamcollier.co.uk/

Edge deployment:
https://adam-astro-1c5oivbgq-adam-collier1.vercel.app/

Unfortunately, the only thing that is missing for me is generating images on build:
image

The current @astro/vercel adapter supports it, so I'm kinda hoping it might be relatively straightforward to add it here too 🤞

@dannygreg
Copy link

Pretty sure Sharp won't run on the edge runtime, but you get Vercel's image optimisation anyway 😄

To remove the error message use the passthrough image service in your Astro config:

image: {
  service: passthroughImageService(),
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants