24 - Photos in ExpressionEngine: Gallery Module or Weblog?

The church series resumes with work on the Photos section of the Church site.

There are essentially two ways to build a gallery with EE - either use the Photo Gallery Module that comes with the Personal and Commercial versions, or roll your own using a weblog and custom field approach.  Both methods have their advantages and disadvantages and in this post I’ll cover some of those and lay out the direction for the sample church site.


So - for photos is it better to use the provided Photo Gallery module or a more custom approach with a dedicated weblog and fieldset?  In one sense, photos are just another content type and EE is especially well-suited to storing and presenting different content types.  However dealing with photos does raise some issues that you won’t normally run into with text content.  Let’s compare the two build approaches:

Weblog and Custom Fields
This approach to a photo gallery in EE offers the following advantages:

  • Unlimited Custom Fields
    The photo gallery has custom fields, but is limited to six. With the Weblog approach you can use way more custom fields (not unlimited, but close).
  • Searchable Content
    Content stored in the Photo Gallery module will not be found by the EE search engine. Content stored in the Weblog module will be.
  • Consistent Workflow
    Using the Photo Gallery will require a different series of steps for adding/editing/deleting content (as well as access to the Modules tab of the Control Panel).  Using a Weblog approach would keep the basic workflow the same as any other content.
  • Comment Moderation
    The Photo Gallery allows comments and offers most of the same options as weblog commenting.  Comment moderation, however, is not currently available in the Photo Gallery Module like it is in the Weblog Module.
  • Meaningful URLs
    The Photo Gallery does not create “Category URL Titles” like the weblog module does. Nor does it use create a “URL Title” from your image title. Both category and single-image views will have ID’s in the last segment of the URL. A Weblog approach would naturally create more meaningful URL’s.
  • User Submissions Outside the Control Panel
    You can use a Stand Alone Entry Form to allow users to contribute photos the site while not letting them have access to the Control Panel.  There is no parallel functionality with the Gallery Module.
  • Tell a Friend
    EE’s built-in Tell a Friend function will work for Weblog entries, but not for Gallery Entries
  • Multi Site Aware
    If you are running the Multi Site Manager and install the Photo Gallery, it will appear installed to all sites.  Categories added will appear to all sites. Control Panel access will be to all sites. The templates that the Photo Gallery installs will only go to one site, but overall the Module doesn’t slot itself into one site discreetly.  A weblog-based approach would live under a MSM installation with better access control and visibility within the Control Panel.
  • Category Sharing
    Weblogs have categories. The Photo Gallery Module has categories.  They aren’t the same, and you cannot create one category group and assign it to both a weblog and a Photo Gallery. If you want one category group to encapsulate Photos and other content, then the Weblog approach would be preferable to the Photo Gallery approach.
  • Granular Permissions
    If you have multiple member groups accessing the site and want to allow them to only have access to a specific gallery, then use weblogs as you can map weblogs to member groups.  Access to the Photo Gallery Module is an all or nothing affair, with no ability to map members to a specific gallery or gallery category.

EE Photo Gallery Module
On the flip side - the Photo Gallery does offer some functionality not directly available with the weblog approach:

  • Batch Processing
    The Photo Gallery allows uploading of a batch of images via FTP to the server.  You still need to go through them and add captions, etc before they publish to the site however. There is no batch processing with the Weblog approach.
  • Multiple Image Sizes
    When you upload an image to a Weblog post you can have EE create a thumbnail.  The Photo Gallery will do both a thumbnail and medium size image.
  • Watermarking
    The Photo Gallery module does offer the functionality of dynamically placing a text or graphic watermark to your image to help prevent image theft. This feature is not available in the Weblog Module.
  • File Organization
    The Photo Gallery can be configured to create category-specific folders on the server for keeping your photos more organized server-side.  This functionality is unavailable in the weblog module.
  • Image Editing
    The Photo Gallery has a Toolbox tab where uploaded images can be cropped, resized, and rotated, and those changes can also be applied to the related thumbnail.  This image editing ability is currently not available via the Weblog module.
  • Quick Implementation
    If it meets your requirements, the Photo Gallery is just flat-out quicker to implement for a site photo gallery. If your schedule is tight or you’re bumping up against the hours you quoted for the job then it’s worth looking at as a solution.

Note that there are 3rd party add-ons on both the weblog and Photo Gallery side that solve some of these issues one way or another - my evaluation here is only around out of the box functionality.

So What To Do?
Keep in mind that I’m building out this site using completely made up requirements - at least from a client/use perspective.  What’s more important to me at this point is the learning value I could show by walking through the implementation.  Since setting up and configuring weblogs, custom fields and templates is what I’ve done for everything else on the site, I’m more interested in walking through the use of the Photo Gallery Module. 

Also - since so many folks are looking to use 3rd party tools like the JavaScript “Lightbox” effect for photos with EE I’d like to work that in as well.

So - my implementation will be to use the Photo Gallery Module, and have it present an index page with photo categories listed.  Clicking a category will load a page of image thumbnails, and clicking a thumbnail will load the full-size image in Lightbox.  The Lightbox script will provide navigation back and forth within the category.

Sound good?

The next post will cover installation and configuration of the EE Photo Gallery Module.

Category Navigation

<< Previous Entry   

Next Entry >>


Previous Comments

Picture of Ty (tzmedia)

by Ty (tzmedia)

Date: Thursday, October 9th, 2008
Comment: #1

Thanks Mike, as I’m following along I really like the way you’ve started discussing the advantages/disadvantages with using one technique or method over another. It helps with the learning process, at least for me.
In some cases one method may be better than another, that’s all on a case by case situation, and even depending on EE v.2 if there are changes and improvements to modules like the photo gallery too.

Did you mention whether or not you tend to use the photo gallery often in the sites you have built up to this point in your car-ee-r, and would still use the same approach in those times when you used the gallery module?

The hierarchy and layout of the new Train-ee design is definitely sw-ee-t.
Thanks again.

Mike Boyink

by Mike Boyink (Author)

Date: Thursday, October 9th, 2008
Comment: #2

I’ve used the Photo Gallery a few times - it works well if gallery is not the primary focus of the site.  If the photos were the primary content - say for a photographer or artist then I’d probably roll my own.

Picture of bernietheone

by bernietheone

Date: Friday, October 10th, 2008
Comment: #3

Wow! Just in Time, Mike! Is there a chance that you bring the next step of this series within the next week? Another Q.: Will the Categories-Subnavigation here be the same as in the Weblog?

Thanks again for this Series, it is a big Help for me as your other Book and the Screencast-Series are all must-haves for new ee’ers which want to make not only one site with this powerful tool that ee is.


Mike Boyink

by Mike Boyink (Author)

Date: Friday, October 10th, 2008
Comment: #4

Hi - I hope to get the next step published later today - it’s about 60% roughed in now.

I choose categories of Facilities / Events / People.  You could create categories to match your weblog, but the photo gallery will not share a category group. 

That’s actually an excellent point that I will add to the comparison in this chapter.

Picture of bernietheone

by bernietheone

Date: Friday, October 10th, 2008
Comment: #5

Thanks for the Info! I’m still trying to wrap my head around the navigation system you build in the weblog and how to achieve something similar without categories. What i mean is the replacement of only a few parts of the page without reloading the whole thing. I knew, in the case of categories there is some filtering in the database done which gets reflected on the entries of the page which are all reload at the time a new category is selected. But what’s going on behind the scenes? Did you have a pointer for where i can read more about this? And: How could i do something similar without categories?

TIAs for a pointer to more info…


btw.: the previewing of comments on this page seems not to work (safari 3.1.2, mac). I get a blank page if i try…

Mike Boyink

by Mike Boyink (Author)

Date: Friday, October 10th, 2008
Comment: #6

Bernd: Not sure I follow you enough to provide any direction.  The entire nature of categories is that they act as a filter on the template.

Behind the scenes is EE doing it’s thing - looking at the URL and returning results accordingly.

There are other ways of filtering - like using the “search_in” parameter on the weblog entries tag and using it with segments - so you push a value into a segment then use the search_in parameter to filter weblog:entries results based on the value of the segment.

All in all you might have a good question to be posted in the EE how to forum.

Preview isn’t working for me either…I’ll take a look.  Thanks for the heads up!

Picture of Jim

by Jim

Date: Monday, December 15th, 2008
Comment: #7

Mike - I am working on a site where there are weblog:entries and on an entry page the client would like 10 or so photos to show up.  I was thinking about using the photo gallery for this, as the online photo editing seems ideal. 

But my question is how do I then relate entry “A” to photogallery “3” and have the photo gallery photos show up on the bottom of entry “A”? 

Does that make sense?  I see lots of how-to’s and tutorials, but they all seem to have the photo gallery photos on their own page, and not integrated or related to the content itself.

Mike Boyink

by Mike Boyink (Author)

Date: Monday, December 15th, 2008
Comment: #8

Jim -

I think the key for that kind of arrangement is going to be creating a weblog field to store the category id of the related photo gallery.

So you’d create the photo gallery, note the ID, and then enter that in a weblog field (if you search around the forums there is a rough extension that creates a drop-down field for the weblog publish screen that shows gallery categories. It was created by Robin - the tech support gal).

To get them on the same page I’d then try wrapping the gallery entries tag in the weblog entries tag:

{exp:weblog:entries weblog="news"}

:gallery:entries gallery="news-photos" category="{custom-field-from-weblog}"}
        images from gallery

I’ve never done this so don’t know if the tags will play well together, but that’s where I’d start.

Picture of toby s.

by toby s.

Date: Friday, March 13th, 2009
Comment: #9

Hey Mike!

I have a question about the gallery module having categories and subcategories: Did you find a way to display those as a nested HTML list?

currently I do something like this:

<ul id="gallery_list">
{exp:gallery:categories gallery="foo" dynamic="on"}
<li><a href="{category_path=gallery/cat}" title="{category}">{subcat_marker} {/subcat_marker}{category}</a></li>

but this won’t create a nested list… Do you have any idea? (EE forum doesn’t)

Thanks for teaching EE such a nice way :)

Picture of pablo

by pablo

Date: Wednesday, July 8th, 2009
Comment: #10

Hi Mike

I have a question, not sure what approach to use for this project I’m debating between gallery module or weblog

i have a project where as of now the client has only given me pictures for one category for all their event posters.

eventually down the line they would like to create a new gallery for every event they have besidas the already created gallery of posters.
so event 1 gallery and event 2 gallery and so on.

is it as simple as to create the new categroy and naming it . and they will be set

or will they have to go into the templates and do changes to see the new galleries appear.

thanks Mike

Mike Boyink

by Mike Boyink (Author)

Date: Wednesday, July 8th, 2009
Comment: #11

They can manage photo categories from the control panels and they will appear on the site without editing the templates.

Picture of Allison

by Allison

Date: Tuesday, November 16th, 2010
Comment: #12

Hi Mike,

Love your site!  I’m still new to EE and your site has been very helpful.

You mention above that you can “roll your own (gallery) using a weblog and custom field approach.”

I am trying to set up a basic site for a photographer friend of mine - and it looks like making my own gallery with weblog’s is the way to go - since it will be the primary content.

Do you have a tutorial - or direction for creating a weblog or custom fields for this kind of gallery functionality?
He is looking to have multiple galleries - with separate groups of pictures.


Mike Boyink

by Mike Boyink (Author)

Date: Tuesday, November 16th, 2010
Comment: #13

Hey—thanks for the comment. I don’t currently have a custom gallery tutorial as they require some 3rd party pieces and (up to this point anyway) I’ve kept Train-EE focused on 1st-party tutorials.

Add Your Comment

Commenting is not available in this channel entry.

Unless otherwise stated all content is © Michael Boyink of Train-ee.com & Boyink Interactive. Please don't steal - I've got kids to feed...