If an image has no width and height attribute and is inside a collapsed section, they will be loaded unexpectedly (as identified in T144734)
This is due to an erroneous fix in T143768 which loads any images without a height.
Instead we should copy the dimensions from the style attribute to the element so that a placeholder element cannot be without dimensions.
Test Plan
- Visit an image-heavy page on our staging server, e.g. http://reading-web-staging.wmflabs.org/wiki/Black-body_radiation, on a mobile device
- Scroll down the page to the bottom
- Verify that all images, especially the inline equations, are loaded
Repeat the test with a Grade A and C browsers, e.g. Safari for iOS on an iPhone 6 and Opera Mini respectively.