Oh, you can really easy accomplish that with a single line of CSS:
#parent_of_imgs { white-space-collapse: discard; }
Disadvantage, you ask? No browser has implemented this extremely useful feature (think of inline blocks in general) yet. :-(
What I did from time to time, although it's ugly as the night is dark, is to use comments:
<p><!--
--><img src="." alt="" /><!--
--><img src="." alt="" /><!--
--><img src="." alt="" /><!--
--><img src="." alt="" /><!--
--></p>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…