Niels-IO / next-image-export-optimizer

Use Next.js advanced <Image/> component with the static export functionality. Optimizes all static images in an additional step after the Next.js static export.
MIT License
439 stars 52 forks source link

Optimize SVG images #189

Open Niels-IO opened 10 months ago

Niels-IO commented 10 months ago

This would be a breaking change, as the Image component just passed SVG through.

This PR would optimize SVGs into images (webp or png) which could be smaller sometimes.

The unoptimized prop would yield the original SVG.

What is missing currently, is for remote images to create a src with a downloaded (and unoptimized) version of the svg and fall back to the remote source if the local image is not available.