Is this not a bit dangerous, according to data uri format we can find:

data:[<MIME-type>][;charset=<encoding>][;base64],<data>

are we not pottentially missing either the mime type or the encoding?