Difference between revisions of "Template:Mainimage"

From DoomWiki.org

(Still not clear enough apparently.)
m (Better explanation of how to check for assigned PageImages)
Line 10: Line 10:
 
# Caption
 
# Caption
 
# Optional: Image size
 
# Optional: Image size
 +
 +
==How to check if a PageImage is assigned==
 +
In your browser of choice, choose to "View source" on the article while viewing it normally. Inside the HTML {{c|head}} element, near the start of the body, will be the {{c|og:image meta property}} tag. If this tag appears in the article's HTML and is non-empty, then an image has been assigned to the page. If you do not believe the image is appropriate, use of this template will override the value already in that tag.
  
 
[[Category:Internal link templates]]
 
[[Category:Internal link templates]]
 
</noinclude>
 
</noinclude>

Revision as of 01:09, 19 April 2015

[[File:{{#setmainimage:{{{1}}}}}|thumb|right|{{{3|}}}|{{{2}}}]]

Usage

Please use this template only when necessary, as the default automated selections made by PageImages will usually choose the best image.

Include an image into an article and mark it as the main article image, for SEO and social media integration purposes. This overrides any automated determinations made by Extension:PageImages when they are used by Extension:OpenGraphMeta, but not currently for any other purpose, ie., in the MobileFrontend. Use of this template is not required in order to assign a page image - note that no image has been selected for a page until it has been edited at least once since PageImages was installed; if you are not seeing good results when sharing or tweeting a page, please try making a minor edit to that article before resorting to use of this template. Arguments:

  1. Image name, without namespace prefix
  2. Caption
  3. Optional: Image size

How to check if a PageImage is assigned

In your browser of choice, choose to "View source" on the article while viewing it normally. Inside the HTML head element, near the start of the body, will be the og:image meta property tag. If this tag appears in the article's HTML and is non-empty, then an image has been assigned to the page. If you do not believe the image is appropriate, use of this template will override the value already in that tag.