add title attr to the generated img tag