One potential guess is that the image tags are being stripped (which is what we generally do in signatures with disallowed tags). That then turns it into a URL that gets autolinked. I guess that URL then gets turned into an attempted unfurl (which fails), but it counts as extra lines in the output.
There's a separate bug about not unfurling in signatures, so if we change that, it would probably resolve this anyway.