Preserve aspect ratio when scaling a user thumbnail

Fixes #675