Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize SVG images #189

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Optimize SVG images #189

wants to merge 2 commits into from

Conversation

Niels-IO
Copy link
Owner

@Niels-IO Niels-IO commented Dec 1, 2023

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.

@Niels-IO Niels-IO mentioned this pull request Dec 1, 2023
@Niels-IO Niels-IO linked an issue Dec 1, 2023 that may be closed by this pull request
@joshuabaker
Copy link

In my opinion, I don’t think it’s wise to make these lossy (i.e. webp or png). Instead, using SVGO with a minimal set of default adjustments (i.e. to avoid excessive path minification) would be better (as requested in #195).

@joshuabaker
Copy link

As noted in #184 (comment), just passing these through is likely the best starting point for SVG handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using remote SVGs
2 participants