More accurate calculation of image width for thumbnails

Now uses the actual default values rather than '250'.

Change-Id: I20f3583bc3863fbe81589df391d015c4cfae3cb6