Image diff doesn't handle large dimension images correctly

Summary

Images are not correctly scaled

Steps to reproduce

  1. Create a merge request containing images with large dimensions

Example Project

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23187/diffs

What is the current bug behavior?

The images are not scaled to the width of the column so that wide images can't be reviewed at all.

What is the expected correct behavior?

Images should be scaled to fit side by side in the 2-up mode, or fit the width of the largest image in the Swipe and Onion modes

Relevant logs and/or screenshots

20181119_screenshot_3\

Output of checks

This bug happens on GitLab.com

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited by James Ramsay (ex-GitLab)