function makeDataUri(raw, url) {
  if (isDataUri(url)) return url;
  if (/^(i,|image\/)/.test(raw)) { // workaround for bugs in old VM, see 2e135cf7
    const i = raw.lastIndexOf(',');
    const type = raw.startsWith('image/') ? raw.slice(0, i) : 'image/png';
    return `data:${type};base64,${raw.slice(i + 1)}`;
  }
  return raw;
}
@param {string} raw - raw value in storage.cache
@param {string} [url]
@returns {?string}