Fix custom HTML attributes for images

The attributes were being generated but not used anywhere.
I can't believe I let this slip through in my original PR... :|