Fix display of thumbnails with fillMode: PreserveAspectFit.