add linkAttributes and imgAttributes during <a> <img> tag generation