PDF download Download Article PDF download Download Article

An image gallery allows you to display images in an organized manner, which can further enhance your credibility and creativity in showcasing pictures, or allow you to demonstrate your capabilities. These aren't well understood in all wikis, but with the details in this article, you can further build out that information.

Part 1
Part 1 of 2:

Building the Code

PDF download Download Article
  1. 1
    Locate the page you'd like to place the gallery on. All wikis have this ability, but while Wikimedia wikis like Wikipedia allow article use, [1] not all sites allow image galleries in the public view on articles, so pick wisely.
    • wikiHow has these, but not to be used on article pages. Galleries can - and should - be used on pages in the User and User_talk namespaces, or subpages of your own userspace. The functionality provided in MediaWiki gives editors the ability to add galleries, but it must be used according to traditional wikiHow policy wisely.
  2. 2
    Check for gallery duplicates. If there are any galleries already on the page, halt! But the files must be exact duplicates of those you planned to add to the new gallery. Ensure the content you're adding contributes to the page.
    • If you find a gallery with only part of the files, add only those files that move the gallery forward.
    Advertisement
  3. 3
    Upload the pictures you'd like to add to the gallery. Have the exact listing of files nearby, as they'll be used accordingly. Storage place will depend from wiki to wiki.
    • On wikiHow, you can upload each picture separately using this upload page.
    • You can use the upload button present in the toolbox in Edit view as well, if you prefer.
    • Other wikis may have alternate advanced editors that allow you to add code, using different formatting.
    • Specific instructions for Wikipedia can be found here .
  4. 4
    Enter edit mode on the page you'll be placing the gallery on. To add the gallery, you'll need the front-end code to build the gallery.
  5. 5
    Ensure you are writing on an advanced editor script. VisualEditor is a popular choice, but this article focuses on using wikitext. Switch to "Advanced editing" to continue further.
  6. 6
    Find the place on the page where you'll display these images. Locate an empty line or open up a new line by pressing Enter .
  7. 7
    Place down the initial format. Type both the <gallery> and </gallery> pairs of HTML, like so:
    <gallery>
    </gallery>
    • Place each of these HTML tags on their own separate lines, to utilize the formatting for this MediaWiki code.
  8. 8
    Ensure you place an empty line. Do so between the two gallery HTML tags so that you can build inside them. Your code should now look something like this:
    <gallery>

    </gallery>
  9. 9
    Build the list of images. Take only the file names, assuring case sensitivity, and omitting the "Image:" (or similar) namespace label. List each filename on a separate line of the gallery HTML set. Your finished code might look something like this:
    <gallery>
    Example1.png
    Example2.png
    Example3.png
    </gallery>
  10. 10
    Add an edit summary. You can type something like "adding an image gallery" or similar. Having an edit summary is usually preferred and can save the time of patrollers and other editors.
    • If you're just making modifications, like adding additional files, type something along the lines of "adding files to gallery," instead, to match your edit.
  11. Advertisement
Part 2
Part 2 of 2:

Submitting the Code

PDF download Download Article
  1. 1
    Preview the gallery. Galleries can be seen on the page by clicking the Preview button, but the placement of this button will vary from wiki to wiki.
    • In one instance, like wikiHow, there's a Preview button that allows the script to show you the final result, once published. It'll allow you to see the order the images are going to be shown to you. But at this point, you won't have published the changes to the page - just showing you an "if you publish now, this is what it would look like LIVE..." view.
    • Other wikis may have alternate buttons located in different spots. Some may be in a drop-down menu specific to the website running MediaWiki, while others would continue with various buttons, but may take a few extra clicks and time to find them.
  2. 2
    Publish your changes. Editor pages will have Publish or Submit buttons to publish the edit, but each wiki is slightly different in where this button is located.
  3. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      About This Article

      Thanks to all authors for creating a page that has been read one time.

      Is this article up to date?

      Advertisement