Consider an img followed by a div, with borders for highlighting the issue:

Where does that 5px default bottom margin / padding / invisible border come from ?

After thorough investigation, you supposedly have to set vertical-align: bottom on imgs otherwise they will align with the baseline of the text thus leaving some bottom margin for letters with descenders below the baseline. Especially hard to spot when you have no text near the image! By the way you can also set the image as block.