spatie / mailcoach-support

Questions and support for Mailcoach
https://mailcoach.app
31 stars 2 forks source link

Image upload limit [QUESTION] #229

Closed maxacarvalho closed 4 years ago

maxacarvalho commented 4 years ago

Hello,

I started using the package (finally).
I'm using the Unlayer editor.

I see an error message when trying to upload images, it says that there's a limit of 1MB per image.
I searched within the package but I couldn't find the place where that's set, is it possible to configure?

Ps.: My PHP settings allow up to 99MB file upload. Of course I don't want to have file that big but still, I'd like to understand where it is.

freekmurze commented 4 years ago

Mailcoach itself sets no limit on the maximum size of uploads. You'll need to configure that yourself. In most cases you do that by upping the max upload and max post size in php ini. Google a bit for a configuration for your hosting.

maxacarvalho commented 4 years ago

Hello @freekmurze

My server is hosted on AWS, my PHP settings allow files up to 99MB (as I already said) to be uploaded.

forge@nicksaude-mailer:~$ php7.4 -i | grep size
post_max_size => 99M => 99M
realpath_cache_size => 4096K => 4096K
upload_max_filesize => 99M => 99M
Command buffer size => 4096
Read buffer size => 32768
opcache.max_file_size => 0 => 0

The error that I'm getting seems to come from the frontend validation, since I don't see any call being made to the the backend. I added a screenshot here, so you can have an idea about what I'm talking about.

Thanks.

maxacarvalho commented 4 years ago

@freekmurze sorry to poke you again.

I'm forever grateful for all the amazing contributions that you and Spatie have done, and will continue to do for the PHP community but, since this is a paid product and the issue I'm facing comes from the product itself, I unfortunately have to say that, "Google search it" is far from what I'd expect from customer support.
Specially because the thing you suggested me to search was already discarded as the source of the problem by the description I included.

I even added a second comment with more details and a screenshot of the error I'm getting, didn't get an answer so I had to add this new one.

freekmurze commented 4 years ago

We'll take a look at this issue soon.

riasvdv commented 4 years ago

Hi @maxacarvalho, this seems to be an issue with Unlayer themselves, I've created an issue here https://github.com/unlayer/react-email-editor/issues/138

We're always using the latest Unlayer version from their CDN, so you can follow that issue and when they fix and release it, it should be fixed in Mailcoach.

Other than that, it's still advisable to keep images in emails small and optimized, your subscribers on mobile (paid) connections will thank you!

maxacarvalho commented 4 years ago

Hello @riasvdv

Thank you very much for your update, I will keep an eye open for the Unlayer issue.
Yes, I totally agree that the images must be kept optimized but still, it's good to know why and how. I might have a client that does not want to follow the best practices and send bigger images, in that case, I must know how to allow that to happen.