Inline elements (or elements that may be displayed inline, such as tables, inline-blocks, images, etc.) are always aligned with respect to the baseline. This is the line drawn across the bottom of the letters in this sentence. Occasionally though letters may drop below the baseline, as in this one (y, g, p). For this reason, the baseline and the bottom line are not the same - otherwise the tails of letters would collide with the heads of the ones below.
This is why there will be a small gap underneath images in this way.
Personally, I like to add img{vertical-align:bottom}
to my CSS. I can always override it for specific images (such as middle
where useful) and this aligns the image to the bottom line.