Revert "Rework thumbnail handling"

This reverts commit 22d1994bb3e204954f46a990a24c3f1a99d4b1c2.