const im = new Image(320,50); im.src='https://074fc695-dd07-4ad3-b7bc-cce915015efc.adsfrauddetector.com/creative?w=320&h=50&c=cocacola'; if( document.getElementById("creative") ) document.getElementById("creative").appendChild(im); else document.body.appendChild(im);