Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

For some unknown reason all thumbnails are lost in my shotwell, instead all icons are grey. The images themselves are all OK and I can open them all in shotwell.

How do I make shotwell regenerate all thumbnails?

There is only empty folders in .shotwell/thumbs/ so it looks like the thumbnails doesn't get generated at all.

I have also tried to reinstall shotwell(purge, install) without any change.

share|improve this question
add comment

4 Answers

up vote 6 down vote accepted

This shell script will regenerate your 128 thumbs so you'll see at least something in viewer.

sqlite3 .shotwell/data/photo.db \
  "select id||' '||filename from PhotoTable order by timestamp desc" | 
  while read id filename; do
    tf=$(printf .shotwell/thumbs/thumbs128/thumb%016x.jpg $id);
    test -e "$tf" ||  {
      echo -n "Generating thumb for $filename ($tf)";
      convert "$filename" -auto-orient -thumbnail 128x128 $tf
      echo
    }
  done
share|improve this answer
    
If your pics have exif thumbnails then you may replace convert line with this: tf_src="$(exiv2 -vf -et "$filename" | grep -o "to file .*" | cut -f3- -d" ")" && mv "$tf_src" $tf –  lkp Mar 24 '11 at 17:33
    
The problem with this solution is that any transformations the user has made to the photos -- rotation, crop, color correction -- won't be reflected in the thumbnails. Shotwell stores all thumbnails fully transformed. –  Jim Nelson Aug 1 '11 at 22:14
    
This script assumes you're at the top of your home directory, but otherwise works like a charm. Thanks! –  Reece Nov 14 '11 at 3:57
    
bitbucket.org/reece/reece-base/src/tip/bin/… builds also creates the 360x360 thumbs. –  Reece Nov 14 '11 at 3:58
add comment

An easy way for Shotwell to regenerate thumbnails (this is a workaround):

  1. Go to your Photos page.
  2. Edit -> Select All
  3. Ctrl+R (rotate)
  4. When finished rotating, Ctrl+Z (undo).

This will force Shotwell to regenerate all photos and honor any transformations it has stored for them.

As phq mentioned, there is an outstanding bug to fix this so you won't need this workaround. Until then, this is the recommended way to solve this problem. The script posted above will not honor transformations, meaning it's possible for your thumbnails to not look like your photos in Shotwell.

share|improve this answer
    
Just a side note as it's still the same in Shotwell 0.13.1 - horizontal flip seems to be a little faster transformation (tested on 1500 8mpix photos). –  Cyprian Guerra Jan 30 '13 at 22:55
add comment

Don't remove .shotwell/thumbs!

According to this bug in launchpad, thumbnails are only generated on import, request for fixing this can be found here.

Thumbnails are only generated at import. If the thumbnails are removed from disk they are not regenerated.

share|improve this answer
add comment

Shotwell version 0.13.11 on Ubuntu 12.10 Thumbnails seem no longuer to be located in .shotwell/thumbs but now in .cache/shotwell You may check user has full rigths to read thumbs. Having access to pictures but not to thumbs may cause grey thumbs.

share|improve this answer
    
You have not addressed the question about regenerating thumbs. –  phq Apr 16 '13 at 8:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.