Skip to content

Response payload exceeded for some images in next/image #308

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

Closed
lindsaylevine opened this issue May 14, 2021 · 5 comments · Fixed by #335
Closed

Response payload exceeded for some images in next/image #308

lindsaylevine opened this issue May 14, 2021 · 5 comments · Fixed by #335
Labels
priority: medium type: bug code to address defects in shipped code

Comments

@lindsaylevine
Copy link

cc @MaximeHeckel

Screen Shot 2021-05-14 at 5 49 01 AM

if anyone sees and is experiencing this issue as well, please do let us know so we can prioritize accordingly!

@lindsaylevine lindsaylevine added type: bug code to address defects in shipped code priority: medium next/image labels May 14, 2021
@ascorbic
Copy link
Contributor

I'm not sure there's anything we can do about this, other than handle the error more gracefully. There is a 6MB hard limit of response payloads from Lambdas, so if it is generating iamges larger than this then it will throw an error. I suggest that we resolve this by returning a better error message if the image is too large.

@lindsaylevine
Copy link
Author

assuming this isn't an issue on vercel, does this mean we shouldn't be using Lambdas for image stuff? would it be possible to do the same strategy as svg/gif (catch this error and return the Location header)?

@ascorbic
Copy link
Contributor

I think it's reasonable to just error out. I can't think of a reason to ever have a 6MB image in an img tag

@lindsaylevine
Copy link
Author

cool, you wanna add this to your open PR or save for another time? 😃

@ascorbic
Copy link
Contributor

I'll do it in another one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium type: bug code to address defects in shipped code
Projects
None yet
2 participants