Fix img with display: block. Fixes text/image overflow on wikipedia.

Ref: #2554
Merge pull request #3419 from glennw/img-block

Fix img with display: block. Fixes text/image overflow on wikipedia.