Panel files sidebar image preview fails

using kirby 2.3.2. after uploading a 4.7MB image (jpg, 300dpi) with 4912 × 7360px tha panel sidebar shows following error. any idea how to fix this?

Fatal error: : Allowed memory size of 104857600 bytes exhausted (tried to allocate 20480 bytes) in /MYPATH/kirby/toolkit/vendors/abeautifulsite/SimpleImage.php on line 1101.

Maybe some of the solutions in Potential Memory leak or am I just using too large files? can solve it for you or by upping you memory limit for PHP :slight_smile:

you where right. thx. dev server had 3x more memory than clients. upgrading service will do.
image was about 100MB uncompressed (like when saving as tiff) but max ram on client server was 64MB.

Using ImageMagick instead of GD might help as well with big files, as suggested in the above mentioned threads (if you are not doing that already …)

how can one use imagick in panel? i only know how to do that in my templates.

If you set the thumbs driver to IM in your config, this driver is automatically used in the panel. Of course, your server must have ImageMagick installed.

c::set('thumbs.driver', 'im');
1 Like

i see. out of curiosity: will switching from GD to IM cause existing thumbs (of templates not panel) to be regenerated or only if file is modified?

I think this will only have an effect on new files, the driver should not play a role in determining if the thumb already exists.

i will give it a try then… recreating 4GB of thumbs would be hell to split in 30sec server runtime blocks.
but i could call imagekit to rescue if all goes wrong.