Jump to content

api created occasionally broken thumbnail images


dlen
 Share

Recommended Posts

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

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  :P . 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 :-)

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...