How do I make Shotwell regenerate all the thumbnails?

This shell script will regenerate your thumbnails of sizes 128px and 360px so you'll see at least something in viewer.

sqlite3 ~/.local/share/shotwell/data/photo.db \
  "select id||' '||filename from PhotoTable order by timestamp desc" | 
  while read id filename; do
    for size in 128 360; do
      tf=$(printf ~/.cache/shotwell/thumbs/thumbs${size}/thumb%016x.jpg $id);
      test -e "$tf" ||  {
        echo -n "Generating thumb for $filename ($tf)";
        convert "$filename" -auto-orient -thumbnail ${size}x${size} $tf
        echo
      }
    done
  done

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.


Update With shotwell 0.18 thumbnails are now generated when manually viewed.

Don't remove .shotwell/thumbs!

According to this bug in launchpad, thumbnails are only generated on import.

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