add url to data uri and fix content type