Add max-height to prevent images from displaying larger than the provided screen size. Also fix a failing test and add a new one.
Resolves #14411. See merge request !3464