Migrated from: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/260
Image resizing code is located at several places now (ThumbnailWidthCalculator, LightBoxImage.autoResize, MultimediaViewer.displayPlaceholderThumbnail); that should be consolidated and documented + tested better. See e.g. comments at<a href="https://gerrit.wikimedia.org/r/#/c/113963/15/resources/mmv/mmv.js" style="color: rgb(17, 85, 204); font-family: arial, sans-serif; font-size: 13px;" target="_blank">https://gerrit.wikimedia.org/<wbr>r/#/c/113963/15/resources/mmv/<wbr>mmv.js</wbr></wbr></a>