remove width&height attr from inserted img and improve img inserting behavior