Made ThumbnailViewer automatically resize to fit image size