Where does Gallery2 store thumbnails?

fatbear92

Joined: 2007-07-31
Posts: 2
Posted: Tue, 2007-07-31 15:47

Hi,

Where does Gallery2 store thumbnails?

Please don't answer with 'on disk' or 'in the database'; I'm looking for a much more specific answer.

Hundreds of my thumbnails are solid black and I need to regenerate them. I've already tried site admin -> maintenance -> Build all thumbnails/resizes but since Gallery2 thinks they're correctly built (they do exist and they are the correct size), it skips them and does not rebuild them. My plan is to delete the bad ones and then regenerate them.


Gallery version = 2.1.2 core 1.1.0.2
PHP version = 5.2.1 apache2handler
Webserver = Apache/2.2.3 (Ubuntu) PHP/5.2.1
Database = mysql 5.0.38-Ubuntu_0ubuntu1-log, lock.system=flock
Toolkits = Exif, Ffmpeg, Getid3, ImageMagick, SquareThumb, Thumbnail
Acceleration = none, full/3600
Operating system = Linux netfinity 2.6.20-15-server #2 SMP Sun Apr 15 07:41:34 UTC 2007 i686
Default theme = matrix
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

 
ripi

Joined: 2007-07-31
Posts: 3
Posted: Tue, 2007-07-31 16:15

probably it will be enough if you delete the g2data/cache contents
the resizes are in the g2data/cache/derivative

regards,
ivan

 
fatbear92

Joined: 2007-07-31
Posts: 2
Posted: Tue, 2007-07-31 16:20

Thank you!

Will gallery2 rebuild the directory structure in g2data/cache if I wipe it all out or should I delete files only and leave the directory structure intact?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-07-31 16:25

g2data/cache/ will be rebuilt by g2, but it will take a long time depending on the number of images / resize versions you have.

you can use lib/support/ -> cache management, to delete the resizes/thumbs.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
tom.perrine

Joined: 2009-05-31
Posts: 1
Posted: Sun, 2009-05-31 17:49

Aha! I've found a solution! My problem was that I was uploading 12-16 megapixel images, and the thumbnail creation was taking forever. (I was uploading 2000+ pics in batches of 100-150.) I had the usual PHP and/or lock timeouts, etc. If I was creating thumbnails at import time, I would get lock timeouts. This led to having cache/thumbnail files which were invalid. G2 knew that the thumbnails were there, so it wouldn't (re)create them when I browsed to the gallery page.

The answer is to use "Edit Photo", then use the rotate function to go CC90, and then C90. Any modification of the base image forces a thumbnail rebuild.

Since only about 50 of the 2000 imaged need to have thumbnails rebuilt, this was much more effective than destroying the cache and rebuilding everything.

 
joshuamarcoe

Joined: 2009-06-04
Posts: 4
Posted: Wed, 2009-06-17 00:15

I had a similar problem...

Uploading 400+ photos, and some of the thumbnails were bad. I think this warrants functionality when viewing a photo as an admin that would allow the admin to recreate the thumbnail.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Wed, 2009-06-17 11:52

There is an admin interface for rebuilding thumbs, all of them ;)

Quote:
g2data/cache/ will be rebuilt by g2, but it will take a long time depending on the number of images / resize versions you have.

you can use lib/support/ -> cache management, to delete the resizes/thumbs.

Other than that, the suggestion by tom.perrine is all you have. Edit Photo and make a modification. You can also rebuild just an album by going to Edit Album > Album and selecting the appropriate options on that page.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
joshuamarcoe

Joined: 2009-06-04
Posts: 4
Posted: Wed, 2009-06-17 13:22
nivekiam wrote:
There is an admin interface for rebuilding thumbs, all of them ;)

Quote:
g2data/cache/ will be rebuilt by g2, but it will take a long time depending on the number of images / resize versions you have.

you can use lib/support/ -> cache management, to delete the resizes/thumbs.

Other than that, the suggestion by tom.perrine is all you have. Edit Photo and make a modification. You can also rebuild just an album by going to Edit Album > Album and selecting the appropriate options on that page.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Thanks for the idea, but I was just thinking that if I have several hundred images in an album, and 20 of my thumbnails get messed up, it would be nice to be able to have functionality to just rebuild the thumbnail itself, without having to rotate to the side, and then rotate back. This workaround is what I used to fix my bad thumbnails for now. Hopefully G3 will have something to fix individual thumbs.

Keywords: Gallery 2 Gallery2 bad thumbnails rebuild recreate fix regenerate