Cloudflare offers image optimization features called Mirage and Polish to paid Cloudflare pricing plans.

**Mirage**
Mirage image optimization automatically performs smart image resizing on your pages selectively based on how the image is used on the page and the device used by your site's visitors. Requires JavaScript.

**Polish**
Polish image optimization strips metadata and compresses your images for faster page load times.
Note: For the service to take effect immediately, you will have to purge your Cloudflare cache.

Basic (Lossless): Reduce the size of PNG, JPEG, and GIF files with no impact on visual quality.

High (Lossy): Further reduce the size of JPEG files for faster image loading.
Larger JPEGs are converted to progressive images, loading a lower-resolution image first and ending in a higher-resolution version. Not recommend for photography sites that exhibit hi-res images.