Call URL.revokeObjectURL(image.src) here once the image is loaded.