Template:ToSVG

This image could be re-created using vector graphics as SVG files. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with {{vector version available|new image name}}.
Template documentation[view · edit · history · purge]
This documentation is transcluded from Template:Convert to SVG/doc.

Used to tag images which should be converted to SVG.

The template automatically sets the following categories: Within the main category “Images for cleanup”, either the subcategory “Images that should use vector graphics” or its subcategory JPG images that should use vector graphics (for files of type “JPG”) will be used; for JPG files, the tag {{BadJPEG}} will also be set automatically.

Usage


{{Convert to SVG}}

Or use the shorthand

The type of the image (such as “flag”, see table below) should be given as a parameter, to add the image to an appropriate sub-category (e.g. Category:Flag images that should use vector graphics). If an invalid value is specified the image defaults to the category “Other images that should use vector graphics”.The following are possible values for parameter 1: [edit subpage]

Topic value Used for… Category #
architecturearchitecture blueprintscategory 534
artsimple images based on artwork, or otherwise related to culture and artcategory 827
astronomical mapa subcategory of mapcategory 96
battle mapmaps of battles and war eventscategory 181
biologyimages related to biology, e.g. animal/plant diagrams, human anatomy, anything biological in naturecategory 1,695
biogeographical mapdistribution & range maps of speciescategory 1,742
chemicalonly for chemical structural formulae, especially skeletal formulae; use chemistry for everything elsecategory 2,167
chemistryimages related to chemistry, e.g. molecular orbitals, crystal structure, lab equipment (use chemical for structural formulae)category 1,297
circuitelectronic circuit diagrams, etc.category 952
city mapa subcategory of mapcategory 440
coats of armscoats of armscategory 13,281
demographic mapdemographic mapscategory 129
diagramdiagrams (e.g. mind maps, flow charts, tree data structures, schematics) that do not fit any other subcategorycategory 8,179
economic mapa subcategory of mapcategory 251
economyeconomic chartscategory 63
election mapmaps of elections and votescategory 823
family treea subcategory of tree diagramcategory 115
fictional mapa subcategory of mapcategory 83
flagflagscategory 6,367
flag mapa subcategory of mapcategory 747
gamea subcategory of sportcategory 107
geologyimages related to geologycategory 350
graphvisual plots of data, e.g. line charts, pie and bar charts, etc. (add graphs to a more specific category like economy, math, physics, chemistry or biology where appropriate)category 7,509
health mapmaps of diseasescategory 74
historical mapa subcategory of mapcategory 1,391
history mapa subcategory of mapcategory 1,391
iconicons, which would be suitable as desktop icons for example (otherwise symbol may be better)category 4,070
incident mapmaps of incidents and accidentscategory 71
law-related mapa subcategory of mapcategory 92
license plateimages of license platescategory 21
linguistic mapa subcategory of mapcategory 736
locator mapa subcategory of mapcategory 10,320
logologos, or images intended to be logoscategory 13,548
mapgeographical mapscategory 7,426
mathmathematical content (see also should use TeX)category 3,007
military insigniamilitary insigniacategory 1,982
military mapa subcategory of mapcategory 347
military relatedmilitary related imagescategory 78
musicalmusic-related imagescategory 73
musical notationsheet music, musical scales, images of notes, etc.category 951
old mapa subcategory of mapcategory 82
organization mapmaps of organizations membershipscategory 50
physicsimages related to physicscategory 1,259
proposed entity mapa subcategory of mapcategory 37
realisticimages of realistic physical objects, people, etc.category 101
religion mapa subcategory of mapcategory 84
ribbona subcategory of military insigniacategory 979
road mapa subcategory of mapcategory 351
sealseal imagescategory 747
signimages of road signs, information and prohibitive signscategory 513
signaturemost images of signatures are best stored in vector formatcategory 1,079
simplesimple images, which are to be converted with little effortcategory 170
sportsport-related images (except for logos)category 506
sport logoa subcategory of logocategory 692
sport mapa subcategory of mapcategory 255
sports clothinga subcategory of sportcategory 810
symbolsimple arrangements of lines and shapes (e.g. warning and informational signs, road signs, arrow symbols, etc.); use icon if it looks like a desktop iconcategory 1,137
tartanimages of (Scottish) tartanscategory 201
technologyimages related to technology or engineering, e.g. construction plans, blueprints, technical drawings of cars/planes/ships/weapons, illustrations of industrial processes, etc. (use circuit for electronic circuits and architecture for architecture blueprints, though).category 1,791
textimages mainly consisting of text in any language (but use text logo for textlogos)category 3,232
text logoa subcategory of logocategory 4,143
transport mapa subcategory of mapcategory 1,452
tree diagrama subcategory of diagramcategory 199
Otherdefault (but see below)category 7,837

Any other parameter value xxxx not mentioned above will cause:

  1. if the subcategory “Category: Xxxx images that should use vector graphics” exists, the file is categorized therein
  2. if such a subcategory does not (yet) exist, the file will be default-categorized to Other images that should use vector graphics
 Note This scheme might still need some work. Feel free to improve the definition of the respective category types to make them more precise or clearer.

You can use a user-script with the following code (the first highlighted line is optional and can be customized). Simply paste it into your common.js (or other MediaWiki skin related) JavaScript page. You can also edit this (script page) per user-preferences:

var convertToSVGTypes = "meteorology, road sign";
importScript('User:Perhelion/fixconverttosvg.js');
If reasonable please notify the uploader(s) by placing the following code on their talk page:
{{subst:SVG/notify|Filename.ext}}

Template parameters

ParameterDescriptionDefaultStatus
1topicClassify image according to its content, as above (complete list).otheroptional
2classClassify image by simplicity. Specify with 2=simple very simple images, extremely easy to draw with a text editor for files of trivial SVG codeemptyoptional
3unusedSpecify something to indicate that the file is not at all used (no need to convert it, no categorization).emptyoptional
categorycategorySpecify another category (with brackets, otherwise it will become a comment). Set empty by typing category= to avoid categorizing.emptyoptional
nfuno fair useAdd any value to create the msg “no fair use”.emptyoptional
vectordatavector dataSpecify (e.g. give a URL or Wikilink) where existing vector data can be found that may help to do the vectorization. This can be an image in a different vector format (e.g. PDF, PS or EPS) but also a similar SVG that already contains parts of the image that needs to be converted. If set, the file is automatically added to Category:Images that should use vector graphics (vector data available).emptyoptional
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

Category:Templates using TemplateData

Used to tag images which should be converted to SVG.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
topic1

Classify image according to its content.

Suggested values
architecture art astronomical map battle map biogeographical map biology chemical chemistry circuit city map coat of arms demographic map diagram economic map economy election map family tree fictional map flag flag map game geology graph health map historical map icon incident map law-related map license plate linguistic map locator map logo map math military insignia military map military related musical musical notation old map organization map physics proposed entity map realistic religion map ribbon road map seal sign signature simple sport sport logo sport map sports clothing symbol tartan technology text text logo transport map tree diagram
Default
other
Lineoptional
class2

Classify image by simplicity. Specify with <code>2=simple</code> - very simple images, extremely easy to draw with a text editor for files of trivial SVG code.

Suggested values
simple
Lineoptional
unused3

Specify something to indicate that the file is ''not at all'' used (no need to convert it, '''no categorization''').

Suggested values
yes
Lineoptional
categorycategory

Specify another category (with double square brackets, otherwise it will become a comment beneath the info box). Set empty by typing “category=” to avoid categorizing.

Lineoptional
no fair usenfu

Add any value to create the msg “no fair use”.

Suggested values
yes
Lineoptional
vector datavectordata

Specify (e.g. give a URL or Wikilink) where existing vector data can be found that may help to do the vectorization. This can be an image in a different vector format (e.g. PDF, PS or EPS) but also a similar SVG that already contains parts of the image that needs to be converted. If set, the file is automatically added to “Images that should use vector graphics (vector data available)” category.

Lineoptional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: all users

Placement: At the bottom of the page

See also

  • {{Convert to SVG animation}} – for images that should be animated SVG (via CSS, SMIL, or scripts).
  • {{Vector version available}} – the counterpart of this template, to be used instead, once the image has been converted to SVG.
    To the extent possible, the specified file name should always be the same!
  • {{SVG-Category}} – when most images in a category have been vectorized.
    Help:SVG § Converting to SVG – for specific instructions on converting to SVG.
  • {{N2+SVG}} – for “Nuvola” or ”Nuvola 2.0+” icon images.
  • {{BadSVG}} – for SVG files with embedded raster images (such as PNG, GIF or JPEG).
  • {{subst:Please use SVG}} – to notify an uploader.
  • {{Template:Should be text}} – for images that can be adequately represented in wikitext.
    Such wikitext may be created in the associated file talk page as an editable source: this allows to render it correctly with appropriate fonts installed, and then to create a snapshot with a sufficient resolution, in order to easily update the image file.
  • SVG conversion suggestion 2.svg

Localization

العربية  беларуская (тарашкевіца)  български  català  čeština  dansk  Deutsch  English  Esperanto  español  eesti  euskara  فارسی  suomi  français  galego  עברית  हिन्दी  magyar  Bahasa Indonesia  italiano  日本語  ქართული  ភាសាខ្មែរ  한국어  lietuvių  македонски  മലയാളം  norsk bokmål  Plattdüütsch  Nederlands  norsk nynorsk  norsk  polski  português  português do Brasil  română  русский  sicilianu  slovenščina  shqip  српски / srpski  svenska  ไทย  Türkçe  українська  Tiếng Việt  粵語  中文  中文(中国大陆)  中文(简体)  中文(繁體)  中文(新加坡)  +/−

This template is localized through {{Autotranslate}}. The layout of the template can be found under Template:Convert to SVG/layout.

To add your language to the list of languages supported by this template, please copy the code of Template:Convert to SVG/en (or any other language version you prefer to translate) and replace the text strings in there (the form below can be used to create a translation, the English version is preloaded in the edit box). Please change the parameter lang from en (or whatever language you are translating) to the language code of your language.


Category:Templates using Autotranslate for internationalisationCategory:Image cleanup templatesCategory:Marker templatesCategory:Requested merges#SVG
Category:Template redirects