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

"Input image exceeds pixel limit" error is too vague #9351

Closed
1 task done
tmcw opened this issue Dec 6, 2023 · 6 comments · Fixed by #9352
Closed
1 task done

"Input image exceeds pixel limit" error is too vague #9351

tmcw opened this issue Dec 6, 2023 · 6 comments · Fixed by #9352
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) feat: assets Related to the Assets feature (scope) feat: errors Related to error handling / messages (scope)

Comments

@tmcw
Copy link
Contributor

tmcw commented Dec 6, 2023

Astro Info

Astro                    v4.0.2
Node                     v18.18.0
System                   macOS (arm64)
Package Manager          unknown
Output                   static
Adapter                  none
Integrations             @astrojs/mdx
                         @astrojs/sitemap

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When I start importing content into Astro I get the error:

 generating optimized images
16:06:30   ▶ /_astro/untitled-1.TT4nkGxv_Z2rFvbz.webp (before: 107kB, after: 15kB) (+30ms) (1/101)
16:06:30   ▶ /_astro/frame_1.G23pLodK_1l8Gb9.webp (before: 101kB, after: 54kB) (+48ms) (7/101)
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: Input image exceeds pixel limit]

Which image? I have many images. Astro probably knows which one, and it should tell me.

What's the expected result?

The error message is instructive and identifies the file that caused the error

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-bvk5u3?file=src%2Fcontent%2Fblog%2Ffirst-post.md

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 Dec 6, 2023
@matthewp
Copy link
Contributor

matthewp commented Dec 6, 2023

Please do provide an example even if it only happens when building. This helps us track down the source of the bug.

@matthewp matthewp added needs repro Issue needs a reproduction and removed needs triage Issue needs to be triaged labels Dec 6, 2023
Copy link
Contributor

github-actions bot commented Dec 6, 2023

Hello @tmcw. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.

@tmcw
Copy link
Contributor Author

tmcw commented Dec 6, 2023

I'll try - the problem is that, because this error is not specific, I can't figure out what file is triggering it so I can't just use that for a repro. I did file a PR at #9352.

@tmcw

This comment was marked as outdated.

@tmcw
Copy link
Contributor Author

tmcw commented Dec 6, 2023

Added a stackblitz example. This is triggered by sharp trying to process a gif.

@matthewp matthewp removed the needs repro Issue needs a reproduction label Dec 6, 2023
@Princesseuh
Copy link
Member

This error is from Sharp, it's a bit of a weird one, typically happens on large images or animated ones with many pages

@natemoo-re natemoo-re added - P3: minor bug An edge case that only affects very specific usage (priority) feat: assets Related to the Assets feature (scope) feat: errors Related to error handling / messages (scope) labels Dec 6, 2023
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) feat: assets Related to the Assets feature (scope) feat: errors Related to error handling / messages (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants