Store thumbnails with reduced redundancy.

Closes #24.