The following code works perfectly for images that do not contain an alpha channel:
toJSON() { let output = super.toJSON(); output["geometry"] =