dlen Posted May 17, 2016 Share Posted May 17, 2016 Hi there, in an image gallery with the following code foreach ($page->bilder as $bild) { $thumbnail = $bild->size($page->thumbnail_size,$page->thumbnail_size); ... a JS gallery function broke down with the error message: "unitegallery.min.js:6 Uncaught Error: Can't get image size - image not inited." I looked into the /assets/files/nnnn/ folder and found 5 images (of about 16 or so) having api - generated version with only 42 Bytes. 4 of them had the string "....0x0.jpg" in their filename, but the 5th had an unsuspicious filename. They were all generated within the same second, according to their timestamp. In the backend, they could neither be opened nor deleted. Via FTP they could be deleted. This fixed the problem with the gallery. In the /logs/exceptions.txt I found lines like leute_im_boot.0x0.jpg - not a recognized image (in /wire/core/ImageSizer.php line 257) In the errors log I did not find anything apparently related. Did anybody observe something similar? cheers - - - Link to comment Share on other sites More sharing options...
kongondo Posted May 17, 2016 Share Posted May 17, 2016 Seen such 'blank' images before. Happened when PHP run out of memory to process a big image. It always annoyed me that ImageSizer insisted on creating the blank image rather than giving up . About not being able to delete them...it means they were still in memory being processed, basically, in a crazy loop I suppose. So, check your memory, or your image size, or use $pages->uncacheAll() after each resizing or increase your set_time_limit(60)/ or 30 maybe, inside your loop to avoid timing out or a combination of all these tricks...With the latest ImageSizer though I think (?) such issues have been resolved...don't quote me though...haven't tested it yet 1 Link to comment Share on other sites More sharing options...
alexm Posted May 17, 2016 Share Posted May 17, 2016 Yea I saw you can use imagemagick for processwire now somewhere. This will get round the out of memory issue. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now