Revert "Rework thumbnail handling"

This reverts commit a1c6d0cc537f5d821034af2f0edc3a8cc04f0ee6.