Normalize <img> tags to use width/height attributes.
Review Request #13345 — Created Oct. 15, 2023 and submitted — Latest diff uploaded
Sphinx turns image widths/heights into
style
attributes, which isn't
ideal. Browsers make use of thewidth
/height
attributes to help with
initial page layout and to calculate aspect ratios, and Sphinx takes
this away from us. These are not deprecated attributes, and not strictly
interchangeable with the CSS styles.The
image_srcsets
extension will now restore these attributes and
remove the CSS styles.
All unit tests pass.