Skip to content

Alllow setting limitInputPixels with Sharp #8886

@orf

Description

@orf

Astro Info

Astro                    v3.3.2
Node                     v18.16.0
System                   macOS (arm64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/mdx
                         @astrojs/sitemap
                         @astrojs/preact
                         @astrojs/tailwind

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

No response

Describe the Bug

I have a large image that I would like to embed in one of my pages.

Locally this fails with:

Server Error: Error: Input image exceeds pixel limit

Which is related to lovell/sharp#2373

In the sharp image service here

let result = sharp(inputBuffer, { failOnError: false, pages: -1 });
there is not away to add limitInputPixels: false to the sharp constructor.

What's the expected result?

I should be able to add limitInputPixels: false to the sharp constructor

Note: I can't upload the gif to the stackblitz editor, so the example below has the image link embedded directly in it. This does not work - you need to copy it locally.

The full gif can be found here: https://tomforb.es/visualizing-how-s3-deletes-1-billion-objects-with-athena-and-rust/animation_5.gif

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-arpawb?file=src%2Fpages%2Findex.astro

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P2: nice to haveNot breaking anything but nice to have (priority)feat: assetsRelated to the Assets feature (scope)help wantedPlease help with this issue!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions