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

ImageMaxSizeExceededError when uploading an image #403

Open
arndvs opened this issue May 16, 2024 · 2 comments
Open

ImageMaxSizeExceededError when uploading an image #403

arndvs opened this issue May 16, 2024 · 2 comments

Comments

@arndvs
Copy link

arndvs commented May 16, 2024

I am currently using the react-email-editor 1.7.10 component in my React Next.JS application, and I have encountered an issue when trying to upload an image.

When attempting to insert an image, I receive an error at the "Almost there - Uploading your image..." stage. The error message is as follows:

at https://editor.unlayer.com/1.9.2/editor.js:2:901383
at p (https://editor.unlayer.com/1.9.2/editor.js:2:887565)
at Generator.<anonymous> (https://editor.unlayer.com/1.9.2/editor.js:2:888892)
at Generator.next (https://editor.unlayer.com/1.9.2/editor.js:2:887975)
at w (https://editor.unlayer.com/1.9.2/editor.js:2:893476)
at a (https://editor.unlayer.com/1.9.2/editor.js:2:893679)

I noticed that there was a recent update to the Unlayer editor, version 1.9.1, released 7 days ago by John Edward.

The release notes mention that this update includes a fix for the use of the image editor. I am wondering if this update might be related to the issue I am facing and if it could potentially address the ImageMaxSizeExceededError.

Could you please provide guidance on how to resolve this error and successfully upload images within the react-email-editor component? Are there any specific configuration options or properties I should be aware of to handle image size limits correctly?

Any assistance or insights you can provide would be greatly appreciated. If you need any further information or clarification, please let me know.

Thank you,

Aaron

@brunolemos
Copy link
Member

Hello, what's the size of the image in megabytes?

@HolyWalley
Copy link

HolyWalley commented May 20, 2024

Hey
We have similar issue (1.7.9) but with the new Magic Images by AI feature. I just pick one of the suggested prompts A photo of a Samoyed dog with its tongue out hugging a white Siamese cat, Surrealism style and surrealism style and then pick first image suggested. And I'm getting this in console

ImageMaxSizeExceededError: Max size exceeded
    at editor.js:2:898992
    at p (editor.js:2:887565)
    at Generator.<anonymous> (editor.js:2:888892)
    at Generator.next (editor.js:2:887975)
    at w (editor.js:2:893476)
    at a (editor.js:2:893679)
image

Chrome says that image that I picked is 3.2MB
We also have 2MB limit on our side, but seems like this validation comes from unlayer.

Any suggestions?

P.S. It looks like this error only happens in our dev environment 🧐
P.S.S. It looks like our dev env domain (localhost) is not added to the allowed domains in unlayers admin. I checked on other our staging and I've got the same error there. So, I assume, in dev we don't use premium and that what causes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants