Images of different shapes.. let me think round, triangle, star-shaped
you can align (lineup) them for example by height
<img src="ttt.gif" height="100" alt="ttt" />
<img src="vvv.gif" height="100" alt="vvv" />
ttt.gif and vvv.gif a different sized and with different aspect ratio
but they appered in same height preserving aspect ratio
If you want some smarter aligning it is not trivial task.
Your program will need more artifical intelligence...