

I personally leave the generator information intact, since it is helpful to other editors.

Adobe Illustrator adds some non-standard definitions to the DOCTYPE, which can be removed without much consideration. The header usually consists of the XML start tag ( ), comment indicating image generator, DOCTYPE (can be left out), and the start tag. Unchecking this option cures most of the problems with the SVG file.

When this option is enabled, a lot of standards non-compliant code is generated and hundreds of kilobytes worth of metadata is added to the file. Preserve Illustrator editing capabilities: off.Fonts: 'SVG' or 'Convert to outline', if the used fonts aren't supported by Wikimedia software (see meta:SVG fonts).When saving the SVG image for use on Commons, the following settings should be used: With the correct settings in Adobe Illustrator CS3, many issues can be avoided altogether. This all and much more is done now with File→Save As…→Optimized SVG since Inkscape 0.47 (2009). This avoids saving Inkscape-specific metadata, which might be useful when editing the same file later, but is useless when using the image for display. Next, the image should be saved as 'Plain SVG' rather than 'Inkscape SVG'. This removes unnecessary definitions from the file, reducing its size. In Inkscape, prior to saving, the File→Vacuum Defs (in later versions: File→Clean up document) command should be used. Try re-saving a problematic file with recommended settings before starting manual editing. Which will not only check the validity of the file and make proposals for parameters to transclude which in most cases can be accepted.Ī good amount of work in later editing can be avoided by simply using the correct settings when saving the file with the vector image editor. Please use never just the valid/invalid-tags! They will mainly categorize to heavily overcrowded categories. Commons has ValidSVG and InvalidSVG tags that can be added to image to indicate either status. Code validation Īn SVG file can be checked for standards compatibility with the W3C validator. Other alternatives include Notepad++ on Windows, and Kate (text editor) or Geany on Linux. Visual Studio Code with the "SVG" plugin by "jock" supports all this, and provides you with live preview (which you can activate by pressing the F1 key and issuing a "Preview SVG" command.) It runs on Windows, macOS and Linux.

It must support undoing and redoing, searching and replacing (preferably with regular expression support), syntax highlighting, and automatic indentation.
