Skip to content
Search

Scour

lastmod 2025-02-14created 2022-12-137 edits

Scour is an SVG optimizer/cleaner written in Python that reduces the size of scalable vector graphics by optimizing structure and removing unnecessary data.

Full Optimization

opy -m scour.scour \
    your.run.svg \
    your.run.min.svg \
    --disable-simplify-colors \
    --disable-style-to-xml \
    --disable-group-collapsing \
    --strip-xml-prolog \
    --remove-titles \
    --remove-descriptions \
    --remove-metadata \
    --remove-descriptive-elements \
    --enable-comment-stripping \
    --enable-viewboxing \
    --indent=none \
    --nindent=0 \
    --no-line-breaks \
    --strip-xml-space \
    --enable-id-stripping

Troubleshooting

Inkscape SVG Import error in React

See React#Inkscape SVG Import error for details.

In short, the command line used was:

scour answer-logo-onlytext.svg answer-logo-onlytext2.svg  --strip-xml-space --remove-descriptive-elements --enable-comment-stripping

When running it as a module, write it as follows:

python3 -m scour.scour ...

See also

Favorite site

author Zer0 sitemap