Updated converter so it can handle datauris