Not the Official WordPress.com Gallery FAQ
This post was last updated on 1 March 2013
My Not-the-Official-WordPress.com Gallery FAQ was first published in July 2008 as an early attempt to bridge the information gap when WordPress.com introduced the Gallery feature back in April 2008, and it has been continuously updated over the various changes to image handling.
A Small but Important Disclaimer: The behavior of the Gallery feature described below is correct as of this Post’s latest update (noted above) and was tested both pre- and post-publishing on my WordPress.com blogs. The Gallery feature and image handling behavior in general on WordPress.com are a continual “work-in-progress” and may go pear-shaped without warning.
- The latest iteration of the Media Manager requires using an up-to-date web browser. If you see warnings in your WordPress.com Dashboard that your browser is out of date, go visit Browse Happy to upgrade your web experience.
- All Gallery shortcode examples given below have extra spaces added around the brackets to avoid inadvertently displaying a Gallery where none is intended.
UPDATE-November 29th, 2012: Ahead of the release of standalone WordPress 3.5 next week, the new Media Manager has been introduced to WordPress.com users. There are significant changes to both media insertion and Gallery creation. You can read more about it in the official announcement. This FAQ has been updated accordingly and “Gallery-A Demo Blog” is in the process of being updated.
UPDATE-November 9, 2011: WordPress.com implements the Photo Carousel, which displays your Gallery images in a lightbox-style image viewer. This is now the default display behavior for all images displayed in a Gallery, including all existing Galleries. More info can be found on Gallery: A Demo Blog. As of July 12, 2012 the Photo Carousel is available to both WordPress.com and WordPress.org/JetPack users.
What is a Gallery?
A Gallery is a thumbnail set of images that appears in your Post or Page. Clicking on any thumbnail image will open the full screen Photo Carousel viewer with a link to the original image.
How do I insert a Gallery in my Post or Page?
Have your Post or Page Editor open and your cursor placed where you want to insert the Gallery thumbnails. Click on the “Add Media” button and then the “Create Gallery” link in the left sidebar of the Media Manager. Choose either “Upload Files” to upload images from your computer or “Media Library” to select images you have already uploaded. After your images have finished uploading or when you are done selecting the existing images, click on the “Create a new gallery” button and your images will appear in a separate Gallery screen in the Media Manager.
Next, to edit the Title (tool tip text which appears when your mouse hovers over the thumbnail), Caption (appears below your thumbnail), Alternate Text (“alt text” for your image which appears when the image doesn’t load or to visitors using a text browser) and Description (descriptive text which will appear in the Photo Carousel or on the image Attachment page), click on each image and edit directly in the right sidebar of the Gallery screen.
In the right sidebar of the Gallery screen of the Media Manager, you can also adjust your Gallery’s settings:
- Link to: Image Attachment page or Media File. (Note: These options are relevant only if you have disabled the default display of the Photo Carousel.)
- Columns: 1 or more (Note: Changing the number of columns does not change the size of the thumbnail. More info about columns/thumbnail size further down.)
- Type: Default (Thumbnail grid), Tiles (rectangular mosaic), Square Tiles, Circles, Slideshow (For important information on using Gallery types and how they differ from the default thumbnail grid display, see Gallery – A Demo Blog: Shapes and Mosaics.)
- To change the Display/Sort Order of images, you can drag and drop each image in the Gallery screen into the order you want them to appear or click the “Reverse Order” button at the top of the Gallery screen or check the “Random order” box in the right sidebar. (Note: Currently there is no option for the Gallery’s previous sort order choices of Menu Order, Title, Image Date-Time or Upload Order. If you want to include these settings, you will need to modify the Gallery shortcode in the Post or Page Editor’s Text tab to add the “orderby” parameter, as per these instructions.)
Once you’ve made your selections, click on the “Insert Gallery” button and the Media Manager will close.
After all that work, what you next see in your Post or Page might surprise you. In the Visual Editor tab you will see a graphic placeholder , in the Text Editor tab you will see the WordPress shortcode [ gallery ids="xxx,xxx,xxx" ] instead of lines and lines of code. Save your Post or Page and then click “Preview” in the Editor to see what your post will look like once published. (Note: You will not see a preview of your Gallery in the Post or Page Editors; you must preview the Post or Page to see the Gallery.)
A Winter Day in Akko:
(Click on any of the above images to read about image Attachment pages in the Photo Carousel, or “right-click” and open the link in a new tab/window to see it in an image Attachment page.)
How many images can I have in my Gallery?
I’m assuming the only limitation is the amount of storage space you have available, so optimizing your images before uploading is important not only because of space and viewer considerations (there are still places in the world where dial up connection is the norm) but also to preserve image quality.
The Gallery doesn’t display the thumbnails in the order I want. How do I rearrange them?
In the Post or Page Visual Editor tab, click on the Gallery placeholder. You will see two small icons appear in the upper left corner of the placeholder, clicking on the left icon (a camera in front of a photograph) will bring you to the Gallery screen in the Media Manager where you can change image display order as mentioned above. Then click ”Update Gallery“.
The Gallery thumbnails on my blog show two in the first row followed by one in the next row or the thumbnails overlap. What’s wrong?
The thumbnail grid Gallery shows 3 thumbnails per row by default. If the Theme you are using is particularly narrow, this knocks the thumbnails out of alignment and you see the behavior described above. In order to change the number of thumbnails displayed per row, you will need to edit the Gallery settings to show fewer columns.
Another way is to switch to the Text Editor tab and directly modify the Gallery shortcode to [ gallery columns="2" ] or if your theme is very wide and you want to display more thumbnails per row [ gallery columns="4" ].
Can my Gallery thumbnail images be bigger?
There are two ways to do this: You can change the default size of thumbnails on your blog via your Dashboard’s >Settings >Media>Thumbnail Size. Changing this setting changes the thumbnail size globally on your entire blog, not just in a single Gallery.
The second way to do this affects only the individual Gallery in your Post or Page and currently can be done only in the Text Editor tab. Modify the Gallery shortcode to [ gallery size="medium" ] or [ gallery size="full" ]. If you do opt for larger thumbnail images, you may also have to decrease the number of columns per row to accommodate the larger size. A combined change to the Gallery shortcode may look something like [ gallery columns="2" size="medium" ].
Tip: for those who want to display their Gallery images at the maximum displayed width for their theme, after inserting your Gallery in your Post or Page, switch to the Text Editor tab and edit the Gallery shortcode to include columns= “1″ size= “full”. This is a quick and easy way to insert multiple images in the same post without having to insert them one-by-one.
Is it possible to edit the images in my Gallery?
WordPress.com has added some advanced image-display features which allow you to edit the display properties of individual images directly in the WordPress.com Post Editor. However, Gallery images can be edited only in the Media Library, either through the “Edit Image” link which appears in the right sidebar of the Gallery screen of the Media Manager when you have highlighted an image or directly in the Media Library. If you make changes to an image from the Gallery screen of the Media Manager, click the Refresh link to update your image.
I’ve added links in the Link URL field on my Gallery images. Why aren’t they showing up?
Because of the way the Gallery works, the Gallery feature will ignore any link you have added to the Link URL field of an image in the Media Library or in the Media Manager. Clicking a Gallery thumbnail will open the Photo Carousel, an image Attachment page or the Media File, depending on your Gallery settings.
However, it is possible to add clickable links in both the image Caption and Description. Any link added to an image Caption or Description must be written as HTML.
Can I edit the Attachment page that opens after clicking on a thumbnail?
If you have turned off the default Photo Carousel in your Media Settings, you can link your Gallery images to either the Media File or an image Attachment page. Attachment pages themselves cannot be edited as a regular Page. If you click on the “Edit Post” button or “Edit This” link that appears on an Attachment page, you will be taken to your Media Library where you can change the image’s Title, Caption and Description, as well as performing some basic image editing functions (see above).
Attachment Page Navigation: When you upload your images directly to the Post or Page where your Gallery photos will be displayed, you can navigate through image Attachment pages either by using the available navigation links or by clicking on the Attachment page image itself, depending on which Theme you’ve used.
However, with the ability to create a Gallery from existing images in the Media Library, there are some inherent navigation problems involved when linking to image Attachment pages. When clicking a Gallery thumbnail the viewer is taken to the image Attachment page in the Post or Page where the image was originally uploaded. (This is also true for single images linked to their Attachment page which are then inserted in a different post than the one they were uploaded to.) You can see this at work by right-clicking on one of the Gallery thumbnails below and opening it in a new tab/window. Displaying your images in the Photo Carousel completely sidesteps this navigation problem.
Commenting: If you have comments enabled on your site under under Settings>Discussion Settings>Default Article Settings, it will be possible to leave a comment directly on an image Attachment page or in the Photo Carousel. If you disable commenting on the Post or Page where the Gallery appears via the Discussion Module, it will still be possible to leave a comment on Attachment pages or in the Photo Carousel, as they respect your site’s Default Article Settings.
In order to disable commenting in the Photo Carousel or on Attachment pages you can disable commenting on your entire blog first in the Default Article Settings and then allow comments on individual Posts or Pages by enabling them in each Post or Page Editor’s Discussion Module. Commenting on images will be disabled, again due to the default article settings. (Note: If you don’t see the Discussion Module in your Post or Page Editor, make sure the box is checked in your “Screen Options“.)
Alternately, you can enable commenting for your entire site, but disable commenting on image Attachment page or the Photo Carousel via each image’s Edit Image screen. A detailed explanation of this method can be found in my post “Comments and Images“.
Can I add or delete images in my existing Gallery?
To add an image, have the Post or Page Editor open and click on the “Edit Gallery” icon in the Gallery placeholder, click the “Add to Gallery” link in the left sidebar of the Gallery screen and then choose either “Upload Files” or “Media Library” to select your additional images. Once you have uploaded or selected all your additional images, click the “Add to Gallery” button. The Media Manager will switch to the Gallery screen where you can reorder your thumbnails and make any other changes to your Gallery settings if necessary. Finally, click “Update Gallery” to return to your Post or Page Editor. Click your Post or Page “Update” button to save your changes.
To delete an image from the Gallery, click on the “Edit Gallery” icon, hover your cursor over the image you wish to remove and an “X” will appear in the upper right corner of the image. Click it to remove the image from the Gallery. Again, click “Update Gallery” to return to the Editor and save your changes by updating your Post or Page.
How can I display an image in the same Post or Page without it being a part of the Gallery?
One of the major improvements to Media handling is the ability to add both a Gallery and separate images in the same Post or Page without the need to manually modify the Gallery shortcode with “excludes” or “includes”. Now when a Gallery is created, all the images are inserted automatically by the use of “includes”. (Switch to the Text Editor tab to see this in a new Gallery post.) This means any other image added to your Post or Page via “Add Media,” either uploaded or inserted from the Media Library, will remain separate from the Gallery.
Can I have more than one Gallery in my Post?
If you want to have more than one Gallery in a post, all you need to do is place your cursor in your Post or Page where you want the additional Gallery to appear and repeat the steps above for “How do I insert a Gallery in my Post or Page?”
Alternatively you can also insert additional Galleries in a Post or Page via Post or Page ID: Create a new Post or Page and upload the images you want there. If a Post, backdate it so that it does not appear at the front of your site. If a Page, and your theme supports using a Custom Menu, make it a published child Page of an already published Page and do not include it in the Custom Menu.
After Publishing the extra Post or Page, go to your Dashboard’s Manage>>Posts or Manage>Pages and then hold your mouse over the title of the Post where you inserted the additional Gallery. In your browser’s status bar, you will see a link to edit your Post, which ends in a number. That is the ID number for the Post or Page where the additional Gallery appears and what needs to be inserted in the Gallery shortcode via the Text Editor tab.
For example, the Gallery just below is coming from a past Post and also demonstrates displaying the square “type” parameter. The shortcode looks like [ gallery id="119" type="square" ] (You can read more about the Gallery “type” parameter display on “Gallery – A Demo Blog“.)
During my testing it became clear that the additional Gallery must appear in a published Post or Page, otherwise when viewers click on a thumbnail, they get a “404-Page not found” error.
Depending on the number of photos you wish to include in the additional Gallery, you may find that the second option is quicker to use.
Can I have a Page that displays all my existing Galleries?
Via Post/Page ID: To make a separate “Gallery” Page, make a new Page and then locate the Post ID number of the Galleries you wish to include in your Gallery Page (see above). In the Text Editor tab, type in the gallery shortcode, together with the relevant Post ID. It will look something like this [ gallery id="210" ]. You can also adjust the settings for number of columns and thumbnail size for each individual gallery displayed on that Page. An example can be seen in my navbar, on “The Galleries“.
Tip: You can also include photos that aren’t necessarily displayed in a Gallery. Just include the Post ID number as described above. Example here.
Via Custom Menu: If your theme supports using a Custom Menu, you can also create a link in your Navbar (or in the Custom Menu widget) to any Post you have tagged with a certain Category (Photos, Gallery, etc.). Whenever someone clicks the category tab in the Navbar, WordPress will dynamically create a page containing all Posts in that category. An example can be seen in my navbar, on “Gallery Posts“. Read more about using the Custom Menu in the WordPress.com Support Doc, with valuable, additional information on wptips.
This FAQ is released under a Creative Commons Attribution/Non-Commercial/No Derivative Works 3.0 License and is not a part of WordPress.com’s official FAQs or Support docs.
→Update April 11, 2011: Following on the popularity of my Gallery FAQ, I’ve set up an entire demo blog to illustrate all of the possibilities mentioned above when using the Gallery shortcode and to test how new WordPress.com themes treat images and Gallery posts.
•Introducing: Gallery-A Demo Blog