Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Content & Markdown

Large Image Error

first-time

Started by Jobert Azares 8 years ago · 1 replies · 646 views
8 years ago

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.

--Edit--
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?

last edited 07/04/18 by Jobert Azares
8 years ago

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.

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Jochen, 8 months ago
6 100 8 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 187 1 year ago
Content & Markdown · by Jan L'Am, 1 year ago
4 148 1 year ago
Content & Markdown · by Leonardo, 1 year ago
3 63 1 year ago
Content & Markdown · by belthasar, 1 year ago
4 259 1 year ago