[RCD] Image resizing - Memory exhaustion

Reindl Harald h.reindl at thelounge.net
Sat May 17 11:45:17 CEST 2014


Am 17.05.2014 11:34, schrieb A.L.E.C:
> On 05/14/2014 07:45 PM, Rosali wrote:
>> Allowed memory size of 67108864 bytes exhausted (tried to allocate 19276
>> bytes) in
>> /var/***masked***/roundcubemail-1.0.1/program/lib/Roundcube/rcube_image.php
>> on line 164
>>
>> Result: Image display fails.
>>
>> IMO there should be a check/limitation not to pass large images to GD.
>> Do any others have such issues?
> 
> Yes. Maybe we could calculate somehow memory requirement of the image
> and skip conversion or add a configuration option specifying max image
> size. In both cases if we skip image conversion we should probably
> display some nice fallback thumbnail image.
> 
> ps. You can configure Roundcube to use ImageMagick instead of GD

the problem is *not* large images, the problem is that some even small
images compressed with insane algorithms needs a lot of temporary RAM

there is no way to catch that on the PHP side except raise the limits



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20140517/5be144f2/attachment.sig>


More information about the dev mailing list