resolved issue with images being inserted before attributes had been parsed