Sometimes thumbnails do not appear.

Hi,

I am very glad to use phpAlbum. Simple installation and use, good-looking layout ...

However, I have one problem:

Sometimes thumbnails are not shown. I can only see the empty picture boxes. Sometimes this problem appears with thumbnails of the pictures I have uploaded, sometimes it appears with the small "pictures" that are included in phpAlbum, representing frames/shadows around user thumbnails etc Often all picture-frames are gone and replaced by empty boxes where the frames should be.

If I empty browser "temporary internet files" everything reverts to normal, but the problem reappears if I press F5/reload page. Sometimes the problem just appears after a day or so. "Scan directories" does not seem to affect the problem.

The same problem appears with or without using the phpAlbum-option "cache thumbnails".

Thanks.

Sometimes thumbnails do not appear - I am having the same issue

I've tried deleting them and reuploading but that didn't help. I've also confirmed it isn't related to the size of the image as there are both smaller and larger images with successfully generated thumbnails.

I think there is something wrong with the pictures

If I drill down and download the pictures they look fine so they are not totally corrupt. But something about these pictures must be different, I actually only have this problem with some of the pictures from a particular source. All of the other pictures that I've received from other sources don't have this problem.

Try this

First of all, I had the exact same problem. Upload pics, view gallery, some of them work, some don't. Think "it's a browser problem, reload..." and it doesn't fix it. Same problem at different computers, same images that don't show. Blow away the cache? Seems to fix it, but then new images don't show.

I figured out how to fix it, for me anyway.

What seems to happen is that on the first viewing of a thumbnail (say when viewing a gallery) the system has to generate a thumbnail and it gets stored in the cache. PHPAlbum farms that out to gd, which is fine. GD is supposed to return a file.

When something goes wrong, it seems like PHPAlbum thinks it gets the thumbnail, but it gets garbage, or only the first step of the thumbnail or something - either GD does not tell PHPAlbum the thumbnail didn't work or PHPAlbum doesn't listen. Now, you have garbage in your cache for that one photo, or any photos that have that problem.

For me, this was happening all the time as my site is hosted on a VPS server where I am extremely limited in the amount of RAM I get - and I get no virtual memory at all (if you can believe that! check www.vpslink.com). I noticed one night while downloading an album with 400 images for the first time after I deleted the cache I was getting fork errors on the server - it was out of RAM, and couldn't do anything. Same was happening to GD about 1/3rd of the time.

To get my big huge gallery to successfully display, what I had to do was go in and delete the cache files associated with the images that had blank thumbnails. So, like "load gallery. OK, pic IMG_0001.IMG is broken: rm ~/my_cache_dir/*IMG_0001* - now reload the browser, cool."

If I deleted all my cache at once, the cycle simply began again. I found if I deleted 10 sets of cache files at once, the first six to eight images would be ok, the last two would still be broken.

FYI

I suppose if I had more time I'd recode PHPAlbum to either recognize the garbage files when forking off GD, or when displaying images out of the cache. There should be some way to recognize that the cached thumbnail is bogus; smaller than the others, only contains the color blue .... something. But then that check would take almost as long as it takes to generate the thumbnail, so ... anyway, I digress.

Thought I'd share my experiences.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


style="display:inline-block;width:468px;height:60px"
data-ad-client="ca-pub-8698264690166658"
data-ad-slot="4417389723">