Gallery2: How to really recreate all Thumbnails and Derivatives

Sheep. Jumping.I have a small, [Gallery2][2] based Image collection [on my website][1]. For some time now, I had problems generating scaled versions of the images when uploading new images. Smaller sizes of images with already correct derivatives were generated corrctly, though.

After much fiddling around, reinstalling plugins, deleting caches, upgrading Gallery and more, I finally found the – simple(!) – solution:

DELETE FROM g2_Derivative;DELETE FROM g2_DerivativeImage;

… then regenerate all the images and you’re set. It took me an evening(!).

Update 27.12.2007: As you can read in the comments of this post and in [this thread][3], there is actually a better way to achieve the same result, all while keeping the database integrity (Something that my approach obviously didn’t ;)). It goes along the following lines:

  1. Set the g_isBroken Flag in the “Derivative”-Table to 1 for all entries:UPDATE g2_Derivative SET g_isBroken = '1';2. Clear the complete thumbnail and resize cache by going to http://www.example.com/gallery/lib/support/index.php3. Rebuild the thumbnails and resizes via the Maintenance in the Site Administration

This fixed the problem I had. Your mileage may vary.[1]: http://mycvs.org/photos/ [2]: http://gallery.menalto.com [3]: http://gallery.menalto.com/node/72699

Comments.

No comments. Be the first to add one!
Add a comment.
We'll never share your email with anyone else. We use the Gravatar system to pull in pictures based on an anonymous hash.
Once you submit your comment, it will be moderated and then show up here shortly after.