![]() | This is the template test cases page for the sandbox of Template:Main page image. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
These are test cases for {{Main page image}} against {{Main page image/sandbox}}. When editing that template, you can use this page to preview your changes. Green, collapsed boxes are unchanged in output from the original.
Width and file prefix tests
edit{{Main page image|caption=image=File:Example-serious.jpg, width=120x120px  |image=File:Example-serious.jpg |width=120x120px}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=File:Example-serious.jpg, width=120x120 |image=File:Example-serious.jpg |width=120x120}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=width=100px  |image=Example-serious.jpg |width=100px}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=width=150 |image=Example-serious.jpg |width=150}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=Empty width parameter |image=Example-serious.jpg |width=}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|Example-serious.jpg|No width parameter, no parameter names}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Portrait orientation
edit{{Main page image|caption=width=120x120 |image=Placeholder.svg |width=120x120}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=width=100x133px  |image=Placeholder.svg |width=100x133px}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=width=x120 (this syntax is not supported) |image=Placeholder.svg |width=x120}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=Aspect ratio 1:2.54 (width=50) |image=Stanley Cup no background.png |width=50}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=Aspect ratio 1:2.54 (width not set) |image=Stanley Cup no background.png}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
No image parameter
edit{{Main page image|caption=Empty image parameter provided (e.g. due to bot) |image=}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
[[File:|120px|Empty image parameter provided (e.g. due to bot) ]]
Empty image parameter provided (e.g. due to bot) |
[[File:|120px|Empty image parameter provided (e.g. due to bot) ]] Empty image parameter provided (e.g. due to bot) |
{{Main page image|caption=No image parameter provided (e.g. due to bot)}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
[[File:|120px|No image parameter provided (e.g. due to bot) ]]
No image parameter provided (e.g. due to bot) |
[[File:|120px|No image parameter provided (e.g. due to bot) ]] No image parameter provided (e.g. due to bot) |
Caption tests
edit{{Main page image|caption=link to [[Main Page]] (wikitext) |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
![]() link to Main Page (wikitext) |
![]() link to Main Page (wikitext) |
{{Main page image|caption= |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Empty caption parameter
{{Main page image|image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
No caption parameter
{{Main page image|caption=Right-aligned |caption align=right |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=Center-aligned |caption align=center |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Alt text tests
edit{{Main page image|alt=Alt text |caption=Caption is different from alt text |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|alt= |caption=Empty alt parameter (should be same as this caption) |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=No alt parameter (should be same as this caption) |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|alt=Alt text |caption= |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Has alt parameter, but empty caption parameter
{{Main page image|alt= |caption= |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Empty alt parameter, empty caption parameter (alt text should be filename)
{{Main page image|image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
No alt parameter, no caption parameter (alt text should be filename)
Link tests
edit{{Main page image|caption=image=Example-serious.jpg, link=Example-serious.jpg (should link to Example-serious.jpg) |image=Example-serious.jpg |link=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=image=File:Example-serious.jpg, link=Example-serious.jpg (should link to Example-serious.jpg) |image=File:Example-serious.jpg |link=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=image=File:Example-serious.jpg, link=File:Example-serious.jpg (should link to Example-serious.jpg) |image=File:Example-serious.jpg |link=File:Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=image=Example-serious.jpg, link=Example.svg (should link to Example.svg) |image=Example-serious.jpg |link=Example.svg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=Empty link parameter (should link to Example-serious.jpg) |image=Example-serious.jpg |link=}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=No link parameter (should link to Example-serious.jpg) |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Border tests
edit{{Main page image|border=yes |caption=border=yes |image=Flag of Japan.svg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|border=no |caption=border=no |image=Flag of Japan.svg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|border= |caption=Empty border parameter |image=Flag of Japan.svg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
{{Main page image|caption=No border parameter |image=Flag of Japan.svg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Thumbtime
edit{{Main page image|border=yes |caption=Caption |image=Money Musk at Youth Dance Weekend 2019.webm |thumbtime=60 |width=180}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Caption |
Caption |
ID float test
editToday's featured article (no caption)
edit{{Main page image|class=tfa |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Today's featured article
edit{{Main page image|caption=Caption goes here |class=tfa |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Today's featured list
edit{{Main page image|caption=Caption goes here |class=tfl |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Did you know
edit{{Main page image|caption=Caption goes here |class=dyk |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
On this day
edit{{Main page image|caption=Caption goes here |class=otd |image=Example-serious.jpg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|
Dark mode test
edit{{Main page image|caption=Caption goes here |class=skin-invert-image |image=Existential quantifier.svg}}
{{Main page image}} | {{Main page image/sandbox}} |
---|---|