Seems as though I can do this:
if(typeof child.material.map.image.src !== 'undefined'){ imageSrc = child.material.map.image.src; }else{ let img = child.material.map.image; let canvas = document.createElement('canvas'); canvas.width = img.width; canvas.height = img.height; let ctx = canvas.getContext('bitmaprenderer'); if(ctx) { ctx.transferFromImageBitmap(img); } else { canvas.getContext('2d').drawImage(img,0,0); } imageSrc = canvas.toDataURL(); canvas = null; ctx = null; }
This will allows me to get the data without having to edit the modules.