Yuval Yuval - 1 year ago 74
PHP Question

Generating image thumbnails using php - without running out of memory

I am currently using a php gd implementation to resize images which constantly runs out of memory - rather quickly. I guess the problem are the php functions, like imagecreatefromstring etc.

Is there an easy implementation to resizing images which doesn't use this functions, so I won't have to increase my php.ini memory limit?

Answer Source

GD don't use that much memory, so you have other problems in your code.

If you resize multiple images and don't call imagedestroy on a newly created image, you run in memory leaks.