LiipImagineBundle
LiipImagineBundle copied to clipboard
Support never reading in the file
Is your feature request related to a problem? Please describe. When processing large images, they can cause PHP to run out of memory as the image file is read in as a binary string.
Describe the solution you'd like When using entirely external commands (e.g. imagick, pngquant, etc), never read the file into memory but work exclusively with temp files.
Basically, I'd like
$binary = new FileBinary($file->getRealPath(), $type, $ext);
$newBin = $this->filterManager->applyFilter($binary, 'prepare');
to have $newBin be another FileBinary. This could also be extended to the media/cache endpoint, allowing for its FlySystem integration to use ->writeStream when uploading.