Hi I have an image field in the back end, that expects multiple images. Now I've added this hook as the files are added:
$page->addHookAfter('InputfieldFile::fileAdded', function($event) {
$inputfield = $event->object;
wire('log')->save('image-resizing', "Resizing ");
$image = $event->argumentsByName("pagefile");
$image->size(800,0,array('upscaling' => false));
$image->size(300,200,array('cropping' => true, 'quality' => 80 ));
});
It works absolutely fine for a small amount of images, but uploading a large amount doesn't seem to work. No errors are logged either.
Now all thes photos appear to have uploaded in the back end, and show the thumbnails, but upon clicking save images are missing.
I've checked all my php settings and ensured they are all adequate enough.
memory_limit 512mb upload_max_filesize 200mb max_execution_time 300
If I disable this hook, I can upload all images fine.
Please could anyone other any insight into what may be causing this issue?
Thanks in advance