delete spaces before img tag