- Issue created by @macjules
- 🇧🇪Belgium dieterholvoet Brussels
This is a pretty serious issue. We have had this happen on a couple projects, someone uploading a big image, and every time it takes down the whole site after we deploy these changes. We get the following error:
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
It seems like the only way to recover is to manually edit the paragraph type entries in the config table, not even a cache rebuild or config import works.
- 🇧🇪Belgium dieterholvoet Brussels
I just checked and in Gin, with the Paragraphs EE modal browser, the icon is displayed as a 172x106 image. If we double that (accounting for retina displays) and feed it into this Image File Size Calculator, it gives us an average file size of 0.2188MB. I think a max image size of 0.5MB should be plenty, especially since with the default Paragraphs module icons are displayed a lot smaller. If someone needs more, they can still alter the form.
- 🇧🇪Belgium dieterholvoet Brussels
Here's a patch that's compatible with core versions below 10.2.0, for use with
composer-patches
. - 🇨🇭Switzerland berdir Switzerland
Instead of a filesize, it's also possible to set size restrictions and it will automatically resize it. That said, how big the icon is displayed can easily be adjusted by custom sizes, ours are considerably larger than the default.