Correctly shrink expanded images in preview popup

The old code was outdated and did nothing.