Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

perf: optimize SVGs#2512

Merged
pwltr merged 1 commit intomasterfrom
chore/optimize-svg
Mar 7, 2025
Merged

perf: optimize SVGs#2512
pwltr merged 1 commit intomasterfrom
chore/optimize-svg

Conversation

@pwltr
Copy link
Collaborator

@pwltr pwltr commented Mar 5, 2025

Description

Inline SVGs like we are using with SvgXml can be relatively expensive to render. This optimizes all SVGs by running them through svgo via a script (average savings 50%). Workflow for new icons: Put raw/unoptimized .svg in src/assets/svgs/raw and run node scripts/optimize-svgs.js, import auto-generated icon function in src/styles/icons

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (improving code without creating new functionality)

@pwltr pwltr requested a review from coreyphillips March 5, 2025 10:14
@pwltr pwltr merged commit 1183e42 into master Mar 7, 2025
7 checks passed
@pwltr pwltr deleted the chore/optimize-svg branch March 7, 2025 14:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants