Skip to content
Alex Canales edited this page Dec 22, 2024 · 2 revisions

Optimizing SVGs for GitHub Project

Follow these steps to optimize your SVG files before using them in the project:

Step 1: Open SVGOMG

Go to SVGOMG. This tool helps simplify and optimize SVG files.

Step 2: Import Your SVG

  • Click Open SVG and select the file you want to optimize.
  • Alternatively, paste the SVG code directly into the input box.

image

Step 3: Configure Optimization Features

In the Features section, enable all options except the following:

  • Remove xmlns
  • Round/rewrite number lists
  • Replace duplicate elements with lists

The SVG will automatically update based on your configuration.

image

Step 4: Download or Copy the Optimized SVG

  • Click Download to save the optimized SVG file.
  • Alternatively, copy the optimized SVG code directly from the interface.

image

Step 5: Edit the SVG

  • Open the SVG file in a text editor.
  • Remove any empty fills or strokes (e.g., fill="" or stroke="").
  • Ensure there is an empty line at the end of the file to maintain formatting consistency.

image

Your SVG is now optimized and ready to use!

Clone this wiki locally