Template talk:Image generation
Template:Image generation has been template protected indefinitely because it is a highly-used or visible template. Use {{Edit request}} on this page to request an edit.Please test any changes in the template's /sandbox subpage or in a user subpage, and consider discussing changes at the talk page before implementing them. |
Suggestion to add Scratch editor
There is alot of software and websites you can use to create vector graphics. One that has not been added to the list here but I suggest adding would be Scratch.
While Scratch is commonly regarded as a programming language, you can also draw vector graphics in the costume editor there, which is what I use it for. Examples like this stickman that I drew
were drawn entirely in Scratch's costume editor.
If not possible let me know. This is really just a suggestion, though I think we should add it as it can be used to draw vectors. AuroraANovaUma (talk) 00:50, 6 May 2024 (UTC)
One letter codes for subcategories "s"
I couldn't find the one letter codes for the parameter "s". --Furfur ⁂ Diskussion 15:18, 19 May 2024 (UTC)
- @Furfur: I found them on this page. —VulpesVulpes42 (talk) 11:31, 16 August 2024 (UTC)
- Hello VulpesVulpes42, thank you very much for the notification. I will have a look at it. I must say that I find the documentation of this template annoying and unnecessarily complicated. I feel little motivation to use it. --Furfur ⁂ Diskussion 17:46, 16 August 2024 (UTC)
Documentation broken
Template:Image_generation/doc isn't displayed anymore. There is some issue with {{Ifsandbox}}. Enhancing999 (talk) 09:41, 10 June 2024 (UTC)
- @Enhancing999: That was fixed somehow, right? --Chealer (talk) 10:52, 8 October 2024 (UTC)
Lua Errors
I am perpetually confused by this template, as I find one letter codes quite non-intuitive. Lately I was trying to resolve some Lua errors, and files in Category:Valid SVG created with Inkscape:Drapeaux created by User:Sémhur seem to have Lua errors created by
{{Igen|I|+|gf|%|sub:=Drapeaux created by User:Sémhur|s=fd}}}} template. Any ideas how to fix it? @Sémhur: . --Jarekt (talk) 04:20, 21 June 2024 (UTC)
- This template (or files such as this) seems to call incorrectly Template:Graphic Lab. For the now resolved LUA errors, see Module_talk:Resolve_category_redirect#Lua_errors. Enhancing999 (talk) 11:10, 21 June 2024 (UTC)
Style broken in some cases since September 2024
For some reason, this template includes |style=<nowiki/> in its source code (currently line 29). Apparently this now causes some files to have broken styles – as reported at Template talk:Created with#style broken, File:Blason-gueules-rencontre-cerf-or.svg and File:Meuble-héraldique-Coquille-1.svg now have no border around the “SVG development” block describing that the files were created with text editors. Changing the line in question to |style= seems to restore the border, but before removing the <nowiki/> I’d like to understand why it’s there… does anyone know? Sarang, who had added it in Special:Diff/153440229, sadly passed away last year, so I guess I’m just hoping that someone else can make sense of it… Lucas Werkmeister (talk) 19:59, 25 September 2024 (UTC)
- @Lucas Werkmeister:
- It's odd: when using string '**/tool~T' (example file) there's no problem unlike on Blason-gueules-rencontre-cerf-or.svg (which uses string '**/161104/658/S' - or simply K2/S) or Meuble-héraldique-Coquille-1.svg which uses string '**/tool~T/S'…
- --Kontributor 2K (talk) 09:01, 26 September 2024 (UTC)
- Nice catch @Lucas Werkmeister and @Kontributor 2K! This parameter is passed to Template:SimplSVG… which is of course another one of sarang's brainf*cking templates, but I believe I managed to clear up its documentation of that parameter. Basically, it seems that self-closing nowiki tags prevent SimplSVG from returning to line (via CSS
clear). I am therefore guessing that it has value in this case, but I can't say why it would misfunction in certain cases and how to avoid that. --Chealer (talk) 04:23, 1 October 2024 (UTC)- It looks like that the issue occurs with parameter '/S' - alias 'Category:SVG simplified Coats of Arms●Zero' + 'Please do not replace…'
- (Other example files in that category) --Kontributor 2K (talk) 10:30, 1 October 2024 (UTC)
- @Chealer: I don’t think that’s the only purpose of the tag here… it looks like {{SimplSVG}} just shows a completely different first box with any
|style=vs. when called without any|style=? This seems to happen because it defaults the style tonone, which is a special case in {{Valid SVG}} (the template documentation there calls it theless salient smaller layout which floats
). Lucas Werkmeister (talk) 12:29, 1 October 2024 (UTC)- @Kontributor 2K, @Chealer: Another alternative to consider might be
|style=/**/. As far as I can see, this also fixes File:Blason-gueules-rencontre-cerf-or.svg; as can be seen from Special:Permalink/931683168, its behavior is subtly different from both|style=and|style=<nowiki/>. I don’t know if the “missing vertical space / line break” after|style=<nowiki/>is an intended or unintended effect, but if it is intended, then|style=/**/would appear to preserve it, unlike|style=. Lucas Werkmeister (talk) 16:54, 2 October 2024 (UTC)- @Lucas Werkmeister: A similar line-break issue has been occurring for some time now, with Attribs (or withOwn…) - example here
- Since then, we use a <br>… --Kontributor 2K (talk) 09:13, 3 October 2024 (UTC)
- @Kontributor 2K: {{Attribs}} generally sets
float:left, which comes from {{Created with/layout}} (no matter how crazy that sounds). Created with/layout changed in July and August in a way which might have affected that, but the previous version is so hard to read that I can't tell. It looks like floating may have been extra conditional before. Would that timeline match the change you describe? Chealer (talk) 8 October 2024- @Chealer: Yes, that timeline, which is close to Darkmode-deployment (I think) matchs that change - exact date of that change is July 6th 2024, if this can help.
- {{SimplSVG}} seems to be impacted too: I left it on this file for an example. Kontributor 2K (talk) 10:52 8 October 2024
- @Kontributor 2K: {{Attribs}} generally sets
- Thank you @Lucas Werkmeister
- I've looked into this way more than I should and although I clarified {{Valid SVG}}'s documentation a bit, I don't have a definitive conclusion. Your testcases show that {{Valid SVG}} can misbehave with
|style=<nowiki/>, but it of course doesn't document such invocations, and it is unclear whether that is a parser bug or a bug in {{Valid SVG}}'s implementation, nor if {{Image generation}} is right to make such a call. - What I can say is that the
<div style="/* invalid control char */">generated comes from MediaWiki's sanitization. As RegExr shows, the characters that trigger that rejection are not in<nowiki/>. The check looks for control characters, which means<nowiki/>is parsed into at least one of these characters. This check is far from new, dating back to this 2010 change from Tim Starling. Either there was a MediaWiki change which now causes {{Image generation}}'s hack to be rejected, or there was some change in this maze which changed the behavior. Chealer (talk) 16:02, 28 October 2024 (UTC)
- @Kontributor 2K, @Chealer: Another alternative to consider might be
- Nice catch @Lucas Werkmeister and @Kontributor 2K! This parameter is passed to Template:SimplSVG… which is of course another one of sarang's brainf*cking templates, but I believe I managed to clear up its documentation of that parameter. Basically, it seems that self-closing nowiki tags prevent SimplSVG from returning to line (via CSS
Request to add Chinese translations
{{Editprotected}} I made some additions in {{Igen/top}} to provide Chinese translations for this template, they should be works if you switch a file page to Chinese language. The new source codes now available at Template:Igen/top/sandbox, you can just copy new codes to main template if you have rights to do that. -- Great Brightstar (talk) 10:15, 9 February 2025 (UTC)
Done, though the whole block affected by the Japanese message update seems suspect to me (even in English) – surely “an image related to mathematics” is quite a different thing from “the output of a function for a given input”, even if the latter is also called an “image” in mathematics? --Lucas Werkmeister (talk) 21:55, 9 February 2025 (UTC)
- This "image" is a specific term in mathematics, but it's possible that someone made a file represent that. The usage of this term is already explained in Wikipedia: w:Image (mathematics). -- Great Brightstar (talk) 07:42, 10 February 2025 (UTC)
Request correction
After reviewing this article on Zhihu.com, I request some corrections now.
Line 45-46:
|zh-hans=统计图
|zh-hant=統計圖
Line 93-94:
|zh-hans=示意图
|zh-hant=示意圖
-- Great Brightstar (talk) 07:42, 10 February 2025 (UTC)
Done --Lucas Werkmeister (talk) 18:39, 10 February 2025 (UTC)
Allow line breaks or shorten long messages significantly
This kind of stuff
really "breaks" {{Information}}. Above is just the worst example from the doc page, but there are some messages that are too long (especially on small screens). Real-life example: File:Enthalpies of melting and boiling for pure elements versus temperatures of transition.svg#Summary. — Mikhail Ryazanov (talk) 02:19, 25 February 2025 (UTC)
- @Mikhail Ryazanov: Which edit are you requesting? Lucas Werkmeister (talk) 10:49, 28 February 2025 (UTC)
- This template creates a
<div>withstyle="display:inline-block;...;white-space:nowrap;...", which completely prevent line breaks in the message text regardless of its length. So my request is to remove thatspace:nowrap;(and adjustdisplay:inline-blockaccordingly, probably todisplay:table). Unfortunately, I could not find where this style is defined, and the original author is apparently deceased, but hopefully somebody else has enough understanding of templates to find where this edit needs to be made. (There is also another issue that all spaces in the second sentence in the above example are non-breaking ( ), but I can change them to normal spaces in the {{Igen/ptx}} source myself after the main problem is solved.) — Mikhail Ryazanov (talk) 11:15, 28 February 2025 (UTC) - @Lucas Werkmeister: I've finally found that the source of the problem is in {{Created with/layout}}, tried some changes in my sandbox and tested them using Special:TemplateSandbox at Template:Image generation, Template:Igen/ptx and File:Enthalpies of melting and boiling for pure elements versus temperatures of transition.svg. The results look fine (long lines become wrapped, otherwise no visible differences noticed). But {{Created with/layout}} is actually used for many other purposes and doesn't have
/testcases, so I'm not sure that such changes will not break something else. Perhaps this needs to be discussed and reviewed somewhere else? — Mikhail Ryazanov (talk) 03:03, 1 March 2025 (UTC)
- This template creates a
Well, since nobody looks here, I've moved the edit request to Template talk:Created with#Allow line breaks... — Mikhail Ryazanov (talk) 00:06, 12 March 2025 (UTC)
Image generation and SimplSVG
For some reason, transclusion doesn't work properly in File:Sun symbol.svg.-- Carnby (talk) 21:14, 27 April 2025 (UTC)
Too complicated
The instructions are way, way too complicated for use by ordinary editors. Needs some examples of common usage up at the top that users can cut&paste. For most editors who just want to mark a few files, it is not productive to plow through 3k of complex directions, exceptions and abbreviations. Chetvorno (talk) 23:51, 15 May 2025 (UTC)
Weird effect of QI parameter
Why does {{Image generation}} output:
But {{Image generation|^}} outputs:
This image has been assessed using the Quality image guidelines and is considered a Quality image.
|
Adding the Quality Image parameter should not change the text of the Inkscape box. Plus "This graphic was created with Inkscape, or with something else." is a completely pointless and absurd sentence. Nosferattus (talk) 02:44, 18 August 2025 (UTC)
- Actually,
{{Image generation}}returns Inkscape-default "tool", since the tool parameter is empty and no other parameter is set, {{Image generation|^}}also misses the tool parameter, which is to be filled systematically ; it does indeed, by the way, return Inkscape-undef.
This image has been assessed using the Quality image guidelines and is considered a Quality image.
|
- --Kontributor 2K (talk) 09:30, 18 August 2025 (UTC)
Strange output
I see "strange output" like {{#switch:s|p=, |P=, |vf|vs|vv|f=|#default= - see example here.--WikiForMen (talk) 22:09, 27 August 2025 (UTC)
Edit request
{{Edit request}} Please add category Category:Quality images if quality image. -- XRay 💬 09:26, 28 January 2026 (UTC)
- One can already add the option
^. --Kontributor 2K (talk) 10:55, 28 January 2026 (UTC)- That's not enough. More than 100 images are missing in the category because of this error. -- XRay 💬 15:21, 28 January 2026 (UTC)
- I reopen the request, you may add details. --Kontributor 2K (talk) 15:25, 28 January 2026 (UTC)
- Without further details, I doubt this request will happen. This template is hard enough to make sense of without having to guess what “if quality image” means (if it just meant “{{Quality image}} is present” then surely the category would already be there, wouldn’t it?). Lucas Werkmeister (talk) 12:14, 30 January 2026 (UTC)
- I reopen the request, you may add details. --Kontributor 2K (talk) 15:25, 28 January 2026 (UTC)
- That's not enough. More than 100 images are missing in the category because of this error. -- XRay 💬 15:21, 28 January 2026 (UTC)
- @XRay: as User:Lucas Werkmeister pointed out, Category:Quality images is added to all images with {{Quality image}} template. If image was awarded "quality image" status then just add {{Quality image}} template, like every other file with this award. I do not see how is this related to {{Image generation}} template. Or am I missing something? --Jarekt (talk) 15:18, 17 February 2026 (UTC)
- @Jarekt: There are a lot of images, which are QI, but not in Category:Quality images. The reason is that they are using {{Image generation}} with option
^instead of {{Quality image}}. -- XRay 💬 15:57, 17 February 2026 (UTC)- @XRay: Images using
^are in subcategories of Category:Quality images - vector. To get them in Category:Quality images too, {{Quality image}} template should be used, if relevant (i.e. if relevant to have the files categorised in 2 QI categories) --Kontributor 2K (talk) 16:23, 17 February 2026 (UTC)- And Category:Quality images - vector is a subcategory of Category:Quality images, so it seems to be working as designed. I did verify in Template:QI template that the logic quarantines files with "^" to be in some category starting with "Category:Quality images". --Jarekt (talk) 17:45, 17 February 2026 (UTC)
- @XRay: Images using
- @Jarekt: There are a lot of images, which are QI, but not in Category:Quality images. The reason is that they are using {{Image generation}} with option
Properly localise "flag colours"
Right now "Used colours" (US: Used colors) gets translated to British English when that localisation is enabled.
However, "Flag colours" (US: Flag colors) (|cb=) still appears with the American spelling even when eb-gb is enabled.
Can this get fixed? Thanks, ConflictFan (talk) 19:43, 26 February 2026 (UTC)
Invalid category for Inkscape-extract
It seems that there is a bug in this template, it is setting the wrong category for extracted using Inkscape: It should be applying Category:Valid SVG extracted with Inkscape but it is currently applying Category:Valid SVG extracted with Inkscape-extract Wolfy13399 (talk) 21:46, 11 March 2026 (UTC)
Wish: Automatically adding the language category to translated SVG files
You may be interested in this wish in the ongoing Community Wishlist: W528: Automatically add the language category to translated SVG files or after translating file (voting open).

I think implementing this would internationalize Commons more, free up volunteer time since users currently do this manually, better enable filtering of search results, and better enable targeted translation of files in another language (eg English diagrams) used in a specific language Wikipedia (eg Japanese Wikipedia). It could also be used for optimizing ranking of search results when users have configured language(s) or when they search in a specific language so that for example users who have configured Korean as their language see the Korean-language-available diagrams higher up in search results.
Currently, users add categories like Category:Chinese-language SVG diagrams manually which means many translated files miss these categories and those that have them may miss some languages, making these categories very incomplete+misleading and the metadata about files incomplete. The cats are also not set by the Image generation template. Prototyperspective (talk) 23:52, 2 April 2026 (UTC)
SimplSVG and Image generation #2
Can someone help me how to transclude SimplSVG by Image generation? Apparently it doesn't work at all.-- Carnby (talk) 20:26, 20 May 2026 (UTC)