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

Astro:assets remote image with vercel ImageService does not use astro domains and remotepatterns #8173

Closed
1 task
pijusz opened this issue Aug 21, 2023 · 3 comments · Fixed by #8452
Closed
1 task
Labels
- P2: nice to have Not breaking anything but nice to have (priority) feat: assets Related to the Assets feature (scope) help wanted Please help with this issue! pkg: vercel Related to Vercel adapter (scope)

Comments

@pijusz
Copy link

pijusz commented Aug 21, 2023

What version of astro are you using?

2.10.12

Are you using an SSR adapter? If so, which one?

Vercel Serverless Hybrid

What package manager are you using?

pnpm

What operating system are you using?

Windows

What browser are you using?

Chrome

Describe the Bug

When I deployed to production with vercel settings:

  adapter: vercel({
    imageService: true,
    imagesConfig: {
      sizes: [80, 200, 320, 768, 1000, 1280, 1920],
      formats: ["image/avif", "image/webp"],
    },
  }),

Image on website does not load.
Created vercel deployment with example: https://terrestrial-transit.vercel.app/

What's the expected result?

Images should be created/loaded on the website

Link to Minimal Reproducible Example

https://stackblitz.com/edit/withastro-astro-4x6y6e

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Aug 21, 2023
@pijusz
Copy link
Author

pijusz commented Aug 21, 2023

#7778

@Princesseuh
Copy link
Member

For Vercel, you need to set the domains and remotePatterns in the Vercel's adapter config, since the format is slightly different from ours domains and remotePatterns, following the format in Vercel's documentation: https://vercel.com/docs/build-output-api/v3/configuration#images

@Princesseuh Princesseuh added needs response Issue needs response from OP and removed needs triage Issue needs to be triaged labels Aug 21, 2023
@pijusz
Copy link
Author

pijusz commented Aug 21, 2023

Ohh, thanks for pointing it out.

Definitely seems like it needs to be in docs and or remotePatterns should transfer from "image" object to vercel config object.
Currently it seems like remotePatterns in image config dont do anything, when Vercel adapter is set.

@Princesseuh Princesseuh changed the title Astro:assets remote image with vercel ImageService does not work Astro:assets remote image with vercel ImageService does not use astro domains and remotepatterns Aug 21, 2023
@Princesseuh Princesseuh added - P2: nice to have Not breaking anything but nice to have (priority) pkg: vercel Related to Vercel adapter (scope) feat: assets Related to the Assets feature (scope) help wanted Please help with this issue! and removed needs response Issue needs response from OP labels Aug 21, 2023
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) feat: assets Related to the Assets feature (scope) help wanted Please help with this issue! pkg: vercel Related to Vercel adapter (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants