change image element to div+background when producing preview for modern browser