#203 (2nd attempt)

Reverted previous attempt to fix this and replaced it with a change to the macro that inserts the img