adding condition to avoid embedded images being detected as relative
urls