Reduce image file size by choosing codec, quality, and metadata options.
The image is decoded, optionally resampled, and re-encoded with a format-specific quality or compression setting; lossy codecs discard information while lossless codecs preserve pixels. Metadata may be retained or removed separately from image data.
data:image/png;base64,iVBORw0KGgo... (image data URL)
JPEG data URL encoded at 70% quality
Web uploads, email attachments, and asset builds compress images.