add attributes to images.
should fix issue #4