Use the connected image workflow
Optimize only when needed, set dimensions deliberately, convert or edit for a real destination, then inspect the exported result before replacing your source asset.
Browser-local limits
Canvas-based export is browser dependent. PNG is broadly available; JPEG/WebP quality and support can vary, and metadata may not be preserved through canvas re-encoding.