Working with Image Galleries in Wordpress


Fun with images

It’s said that a picture is worth a thousand words. Or maybe it speaks a thousand words, I’m not sure. The point is that an image can tell a story a lot faster than text can. This isn’t to say that images are always preferred over text; I’m pretty sure you can agree that isn’t the case. It is no secret, however, that images and text work extremely well together. Other than just spicing things up, an image can also help tell a story and (literally) illustrate a point.

Some sites use more images than others, but most sites are better offwhenever they do something thoughtthrough with their galleries and illustrations. This chapter is about displaying images in a WordPress site, beyond the traditional inclusion of illustrative points or inspiring scenery in your posts and pages. It is more about galleries, presentation, and photo-sharing services, not to mention the small matter of actually setting up WordPress image management in a way that makes sense.

Working with Image Galleries

Ever since WordPress 2.5, there has been support for the [gallery] shortcode and the possibilities it brings. What [gallery] does really is output uploaded images in a clickable thumbnail grid. Then you can let your visitors see a larger version of the image, either in your theme’s design, or the original file itself. The former is called the attachment page, since that’s what images are: attachments to weblog posts. This built-in functionality should cover most of the needs you may have if you run a text-based site that sometimes publishes images.

To fine-tune it even further, the first stop after installing WordPress and picking the theme of your choice should be the Media page under Settings in the admin interface. Here you can control the circumstances under which the various images are scaled. Each image you upload is saved in up to four different versions, designed for your needs across the site.

The WordPress Media settings page, which outlines the various sizes your images can be:

There’s one caveat: no image version will be created if it is in fact larger than the original image. So if your large image is set to 800 pixels width and height, but the image you’re uploading is smaller than that, it won’t be created nor will it be available to include or link to in WordPress. There’s just no point.

So what about it then? Why bring this up?

Simple. The thumbnail should be in a size that fits your width and the number of columns you think you’ll want to use normally in your image galleries created with the [gallery] shortcode. Make it a nice size for your site.

Meanwhile, it is my belief that the medium image should be the exact same as the maximum width your design can manage. In other words, if the max width is 580 pixels, set the max width of the medium image to 580 pixels, to ensure that you can include it in your posts whenever you like. Since the medium image is the one used in attachment pages it is a good idea to make it fit well enough there. Granted, you’re in something of a pickle if your attachment pages are constructed in such a way that they can manage a larger image than your traditional weblog posts, but if that is the case you’ll just have to create custom images for your posts. The important thing is to make the attachment page look good.

Finally, the large image is good for linking a larger variant. One can argue that perhaps the large image should be the one in the attachment page, and it is probably possible to make it so, but by default that’s not the case and hence you can’t rely on it. The large image is usually only interesting if you’re uploading a high-resolution photo and don’t want to link the original version because it is 15 megabytes and ridiculously large for Web view, and the large one is substantially smaller and fitted to the screen.

WordPress should promote the image size settings more, I think. They are important whenever you will be working with images, so get them right from the start; otherwise you’ll end up with images at the wrong size, and that’s not a pretty sight in any design.

Legal Disclaimer

Our website is not responsible for the information contained by this article. Articleinput.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.

Note: This article was sent to us by: Jason D. at 05132010

Related Articles

1. Wordpress SEO and Search Plugins
SEO and Search Plugins What’s good SEO and what’s bad is hard to tell, except for the basics of course, which are pretty much agreed upon. The whole...

2. Making the Most of Image sharing Services in Wordpress
Making the Most of Image-sharing Services For sites running on limited hardware or shared hosting accounts, it may be crucial to save on both space and bandwidt...

3. Show off Your Twitter for Wordpress
Integrating the social web Before digging into the various techniques used to display and connect to the social Web, it is important not to forget the most ob...

4. How to do lifestreaming with WordPress
Lifestreaming with WordPress Lifestreaming is a term commonly used to describe the mashing up of everything you do online. A bit presumptuous, perhaps, to assum...

5. Social Web Submit Buttons plugin Worspress
Social Web Submit Buttons The social Web is certainly a big consideration when working with editorial content today. While search engines can trickle in visitor...

6. Wordpress Hosted Comment Solutions
Pimping the Comments With the addition of threaded comments in the WordPress core, and the excellent CSS styling options that are now available, as well as the ...

7. How to Backing Up database for Wordpress
Backing Up Anyone who has lost data in a hard drive crash or similar knows the importance of backing up, and it goes without saying that this applies to your on...

8. What you need to know about the Wordpress database
Hacking the Database Most of the time you needn’t worry about the database; WordPress will do that for you. There are database changes between versions so...