Revert "Performance increase in thumbnail handling"

This reverts commit 713fe0491d431cef8175113eeea29e869b9ca7ae.