Fix thumbnail size parsing, add a couple of tests