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

🐛 BUG: images integration could use better error messages when invalid props are provided #3994

Closed
1 task done
tony-sull opened this issue Jul 20, 2022 · 0 comments · Fixed by #4013
Closed
1 task done
Assignees
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@tony-sull
Copy link
Contributor

What version of astro are you using?

1.0.0-beta.73

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

None

What package manager are you using?

pnpm

What operating system are you using?

Mac

Describe the Bug

A few rough edges related to prop validation came up during the bug bash today, specifically:

  • <Image /> with an undefined src can hit an error when getImage
  • <Picture /> with an undefined widths can hit an error in getPicture
  • Hard to debug why it doesn't work if @astrojs/image is installed but not added to the Astro config - can we error here in <Image /> and <Picture />?
  • can Astro automatically handle <img src={myImage} />? The plugin would convert this to an ESM import, if nothing else does ?raw work here?

Link to Minimal Reproducible Example

https://astro.new

Participation

  • I am willing to submit a pull request for this issue.
@tony-sull tony-sull added - P3: minor bug An edge case that only affects very specific usage (priority) s1-small labels Jul 20, 2022
@tony-sull tony-sull self-assigned this Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant