From IndieWeb

The sparkline template is used to display an inline photo with an optional class attached, e.g. to make a u-photo microformat. It is commonly used to create templates for users to sign their chat-name on Etherpads or wiki pages.

Before You Start

IMPORTANT: Before you create a sparkline template, please:

That will give you a better idea of what to use for your sparkline template.

Blank Template

Copy, paste, fill in URL of the photo, then continue to the next section


If you want to add a class, add a class= parameter:



the URL of your photo
(optional) the class(es) to add to add to the <img> tag.


The numbered prefix "1=" is technically optional when using this template. They're used here to make the documentation clearer.

If your avatar image has a query string on the end (like ?size=128), you should use the numbered prefixes to ensure your image is displayed,e.g

  • {{sparkline|1=https://example.com/me.jpg?size=128}}

How to make a small h-card template

To make a small h-card template that allows you to easily add your name, link, and photo to a wiki page:

  • On your wiki user page, temporarily add: {{yourname}}
    • Replace "yourname" with your chat-name or other short form of your name
    • This is not your domain. You don’t use your domain in chat so please no "www." or ".com" etc. in your sparkline either.
  • Click the resulting link to edit the template.
  • Copy, paste, and edit with your information (note that you do not edit the word sparkline):
<span class="h-card" style="white-space:nowrap">{{sparkline|1=http://example.com/your-profile-image.jpg}} [[User:Example.com|Your Display Name]]</span>

If you have any questions, ask us in the meta chat channel.

Browse other community members' templates

How to include your h-card in your wiki signature

After creating your h-card template, open the Special:Preferences page and scroll to the "Signature" section. In the "New Signature" field, add {{subst:yourname}}. Check the box for "Treat signature as wikitext (without an automatic link)" and click "Save."

You will now be able to sign your comments on the wiki with your h-card, using three tildes: ~~~

To sign with your h-card + current datetime, use four tildes: ~~~~

How to edit a sparkline

If you want to change an existing sparkline – for example, to update the user image – you can find the template at:


Replacing "yourname" with your name or chat-name that you used when creating the template, e.g. "aaronpk"




Will generate:

small h-card template using sparkline: (see: Template:t)

<span class="h-card">{{sparkline|1=https://twitter.com/t/profile_image}}[[User:Tantek.com|Tantek Çelik]]</span>

Will generate: Tantek Çelik