Large Image Error

Hi I added an image to a file which is around 8mb and after that every time I access that page in the admin page I encounter this error:
“session_start(): Failed to decode session object. Session has been destroyed”

Can’t grav use an image like that?

Thank you.

I removed the image caching and the error went away. Is memory caching of images not viable for large images?
Then I tried a smaller version of the file which is 2048x1365 600kb. Whenever I use the .resize() function I get a memory insufficient error. I have allocated 32MB on my server for memory. Is it still not enough?

32MB might be quite too low, depending on the amount of images, the size of images, and operations ran upon them. As a rule, it is best to limit all images to a maximum size or resolution before using them on a website, and 256MB memory limit will make a difference. If you could do more, like up to 1024MB, then even better.

The problem is really that the amount, size, and operations compound the problem. The more you have of each, there will be an exponential increase in the memory needed - largely due to how the GD-library for PHP functions.