WordPress UnGallery

UnGallery dynamically publishes directories of images and embeds them into your WordPress blog.  The name describes the goal of the plugin to stay out of your way and allow you to manage your images with no administration in WordPress.

This approach allows your powerful administration tools like FTP, SCP, automation scripts, and image editors to directly manage your image library.  Changes are automatically reflected in WordPress.  There are no web forms to select files for upload.  There is no importing or modifications to the database.  The gallery files are accessed remotely by WordPress and remain accessible and manageable, outside the WordPress environment.

If you’ve ever had to reorganize where your photos are stored, remove a few from a large set, or edit the red-eye of a dozen pictures after uploading, you know how inconvenient it is to return to the website management UI to update everything.  With UnGallery, all these add/remove/edit changes you make to your library are automatically rolled into WordPress.




  • Unlimited depth, breadth, and number of photos. The gallery here has approximately 25,000.
  • Photo library is managed outside of WordPress.  Simply update via FTP, SCP, etc.  UnGallery displays changes automatically.
  • Multiple gallery views:  Top level marquee (optional), thumbnails, browsing previous and next pictures.
  • Gallery hierarchy breadcrumbs with links to parent, present, and sub-galleries
  • Optional and default banner captions
  • Unbrowsable, hidden galleries
  • Caching for faster page reloads
  • Support for MP4 movies embedded within WordPress
  • Automatic image rotation of jpegs with exif orientation, if available


  • The layout is configured for the default WordPress installation.  I use the excellent Atahualpa theme and increase the page width to a modern browser standard.  The sizes of all thumbnails, images, and columns are configurable.
  • Feel free to use it, extend it, or contact me with questions.


  • Grab the current version at WordPress.org.
  • The installation steps are mostly standard, though there are couple simple, extra steps, noted in the instructions.



182 comments to WordPress UnGallery

  • Hi Adrian and thanks!

    I’m thinking the plugin is somehow not correctly identifying the path to the cache dir and so does not report success. Are there any data files being created in it? If so, we could likely ignore the error. If not, can you check the other areas on the plugin admin page where UnGallery tries to note the paths it thinks are valid? There is one near the end of the fancyBox section and another in the Tips and Troubleshooting section under: / Path / item #4. Those should have a similar parent path format as the cache dir’s.

    I looked for an easy way to add sorting alternatives to the plugin and did not find one. It would require managing the file dates within UnGallery. It does honor alphabetical sorting though so a workaround would be to choose a naming convention that is chronological. Digital cameras often do this automatically or filenames can be edited to support an explicit ordering. On my site, I also create dated directory trees by month and year, so the galleries can be browsed in smaller sections, based on time.

    Hope this helps a little.


  • Adrian


    Thanks for the reply. There are files in the cache dir and the page is loading fairly quickly so I guess it’s working.

    WRT to the file management, I use your plug in to display images that are captures on my smart phone and uploaded instantly. Your plug in is the only one that will provide an instant display of the new images (because it’s folder based – the only other one is lazyest gallery) and also orientates the images correctly. So it would be nice to put the most recent first, as you point out the files are names with a convention that is chronological, so this may simply mean displaying the images in reverse alphabetic order rather than having to read the dates?


  • Hi Adrian,

    Reversing the sort is simple and I actually think it makes a better default so I updated the plugin. Please upgrade to v2.1.1 to sort from most recent to oldest. Thanks for the suggestion.


  • Adrian

    One final thing, I am a little confused with adding additional galleries in the advanced section. Does this simply create separate pages for images contained within directories that are in the main directory?? So that if I had 2 users uploading images and I wanted them to be in separate galleries, the images need to be in separate directories but contained within the directory specified in the general settings sections? or does it create galleries for other image directories?

  • Adrian,

    It allows you to have multiple root galleries, both from a URL and a file system perspective. So yes. If you had separate directories for multiple users, uploader permissions, or disparate image hierarchies, each could be assigned a unique UnGallery instance. A distinct gallery URL would then map to the additional directories, which can provide a logical separation by theme, purpose, etc. While the paths set for the additional galleries could be entirely separate, it is not required. If I had built an extensive directory hierarchy to organize photos, I could still add a new root gallery URL pointing to some directory deep in a previous gallery’s path.

    I don’t use the feature, but it was requested some time ago. Hope this helps.


  • Hi there Mark,
    I love the idea of unGallery, however I am having serious problems.

    The gallery appears to work, but instead of thumbnails I an index of the gallery directory. I’ve set the permissions to 777 in the cache…

    Any help would be greatly appreciated. I’ve read through the forums (155 posts) and nothing you’ve suggested elsewhere seems to help. Thanks for any suggestions.


  • Adrian


    Found a small bug, when viewing the gallery with fancy box the link to the original image does not work – the url contains one-to-many trailing slashes after the image directory,for example:


  • Hello sgm,

    Looks like this is because your gallery location creates the same URL as the WP page name you created (http://yoursite.com/gallery). You can either move your directory somewhere else or name it anything different than the same as you chose for your WP page name. For example, a directory called ./worpress-install/photos would work. Just change the path on the admin page. Or change the page name you choose to something else like pictures, etc.

    Hi Adrian,

    I’m not able to reproduce that behavior. The direct linking to photo should always start with http://mydomain.com/wp-content/plugins/ungallery/phpthumb/phpThumb.php?src=/ . That uploads syntax in your link looks more like where the WP native system stores files. An example direct link on my site is: http://markpreynolds.com/wp-content/plugins/ungallery/phpthumb/phpThumb.php?src=/home/mmond/pics//namaste.jpg. Can you send me an example from your site? I actually do see the extra trailing slash now, but it does not seem to affect the page loading. I’ll look at it.

    I will say the search link structure is broken. I’ll fix that asap. Also I’d like to be able to provide a link that brings up the FancyBox interface, but it involves a jquery call I haven’t yet figured out.


  • Steve

    Hi Mark,
    A fantastic plugin first of all! I’m just wondering if it’s possible to split a large image directory into “pages” that you can click through (apologies if this feature is already implemented – if so how can I get it working?). I ask because when a large image folder is opened (i.e. 100s of images) it takes forever to load and it would be nice to split it up into sections instead by clicking “next” or “previous”. Is that doable?

  • Adrian

    Feature Request!

    Well 2 actually:
    1. I second the above request from Steve about limiting the number of images per page – this could be a user definable option?
    2. It would be nice to have pretty links for the sub-galleries – I have a large number of sub-galleries and these simple are listed one after another making it difficult to navigate. Having the option to include a thumbnail either automatically from the photos enclosed in the sub-gallery or manually assigning one would be great.
    3. It would also be nice to give the option of whether a gallery is listed in ascending or descending order per gallery.

    I would be more than happy to make a donation if it would help implement these features?


  • Hi Steve,

    Thanks! Sorry for the delay. For some reason, I did not receive an email fyi of your post. You are correct that UnGallery does not support a maximum thumbnails per page setting. I’ve actually considered this feature in the past and will take another look at it.

    The closest option currently is to organize images into directories supporting page divisions. That is, you could have a gallery titled “Cancun Vacation” and instead of all pictures in one directory, use subdirs like “Scuba Dive”, “Nightlife”, and “Hiking”. …or even “Page One”, “Page Two”, etc. You would not be able navigate directly from one of these subdirs to the next though.

    Hi Adrian,

    Thanks for the feedback. I can see both those requests being useful. My development availability for UnGallery is currently limited, but I’ll investigate.


  • Hi folks,

    Please update to version 2.1.7 to address a security issue.

    Also, I have a max thumbnails beta I can release soon. It’s a been a busy year, but I’ll get that out soon.

    Lastly, if anyone is using the multiple gallery feature or wants to, would you let me know, please? It’s complex to maintain, may be currently broken, and scheduled for deprecation unless there is a significant need for it.


  • Adrian

    Hi Mark,

    Thanks for the sterling work. I do use the multiple gallery feature. If this is a big hassle to maitain, why not make 2 versions of the plug in – one with the multi garrery feature and one without, then just maintain the one without?


  • No problem, Adrian. I’ll leave it active until either no one wants it or it becomes too difficult to maintain. …and it’s not broken in the current releases. I just forgot to add WP pages for them in my tests. =)

  • Is there a non-Wordpress version of this?

  • Hi Angelo,

    The short answer is no. This originally started out as a non-WordPress project and was ported to a plugin. But that was many years ago.


    I tend to make more progress over the holidays. I’ll try and deliver the recently discussed updates by EOY.


  • Configurable number of thumbnails per page is here! =)

    Check out v.2.2.2 and let me know if you encounter any issues.


  • Hi, i installed you last version of ungallery.
    i create the page and at the page http://blog.sedriano5stelle.it/extgallery it works great, but when i click on an image, it no show anything … (This image colud not be loaded) ..
    if i try to open the image on browser (copy link) example : http://blog.sedriano5stelle.it/extgallery?src=/home/cor277/public_html/sedriano5stelle.it/ow_userfiles/plugins/photo/photo_7.jpg it show me the correct page and image, and if i click on image, the slideshow load it ..
    how i can resolve that problem ? (apologize for my english).
    other question : it possible to -filter- how image show on filename filter (eg. show only image that start with “real_” .. ? becouse i use an a directory that i store the normal image and the thumbinail (from other site).

  • Hello. It looks like there may be a conflict with another gallery plugin. That “Image cannot be loaded error” displays in a pop up dialog box that is not UnGallery’s. If another plugin is set to render all image links clicked, that may account for the issue. Can you try disabling any others to test this? Also, UnGallery works best with the optional fancyBox plugin, which may help resolve the conflict.

    I’m not sure about your filter question. UnGallery manages thumbnails using its own cache. There should only be the pointer to the directory of original photos. Can you explain more about this and what you mean by: (from other site)?

    Thanks for checking out the plugin!

  • mac-mac

    WodrPress 3.6.1 and Ungallery = trouble: “The requested content cannot be loaded. Please try again later.”
    Please help.


  • Hello mac-mac,

    It looks like you fixed this? Ungallery comes up ok when I click your link above. If you did something specific to correct a problem, could you post that information here?


  • mac-mac

    I change permissions for all items in gallery folder from Folder:755 and Files:644 to 777. And it work… oops… not fully worked – http://babyblog.mac-mac.ru/allphoto/?gallerylink=1_klass/1klass-end – some photos not open…

  • mac-mac

    and more, earlier was error on lines 456-457 in (seems) phptumbs something with the time zones… i’m not remember exactly and can not make it again…

  • Ok, so it looks like it is more about file permissions than WP 3.6.1. I updated my example blog to the latest WP and it’s working ok too. (Although I did briefly have some upgrade errors)

    Can you match the permissions on the photos still not working to the ones that are, in order to fix?

  • mac-mac

    all files in “photo” set to 777 with owner ’0′ and group ’0′
    ‘cache’ folder set to 777 with owner ’0′ and group ’0′ and inner structure with owner ’99′ and group ’0′ with 755 and 644 for folders and files
    May be troubles because of other owner of inner items?

  • mac-mac

    If click on not loaded thumbs for open image in new window then new window will open with error:
    Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Europe/Moscow’ for ‘MSK/4.0/no DST’ instead in /share/MD0_DATA/Qweb/babyblog/wp-content/plugins/ungallery/phpthumb/phpThumb.php on line 456

    Warning: Cannot modify header information – headers already sent by (output started at /share/MD0_DATA/Qweb/babyblog/wp-content/plugins/ungallery/phpthumb/phpThumb.php:456) in /share/MD0_DATA/Qweb/babyblog/wp-content/plugins/ungallery/phpthumb/phpThumb.php on line 457

    If make this window refresh – image loads.

    Sorry for bad english

  • I’m certain your English is better than my Russian. ;)

    It looks like the current version of WP may have changed whether it explicitly sets the timezone. This is exposing some dated issue with phpThumb. If you search google for the error, there are a couple of options. If you have access to your php.ini file, that’s the best place to set to fix any all file instances. Or you could add the function call at the top of the offending php file. http://stackoverflow.com/questions/8811603/how-to-fix-php-errors-related-to-timezone-function-strtotime-and-function-date

    I’m not sure I have a better solution than these.

  • mac-mac

    i add in header.php and strange… http://babyblog.mac-mac.ru/allphoto/?gallerylink=1_klass/1klass-end – here all ok except some images, here is not work http://babyblog.mac-mac.ru/allphoto/?gallerylink=1_klass/2towers
    Partially work.
    now this is a feature, not a bug))

  • mac-mac

    set ‘date.timezone = “Europe/Moscow”‘ in php.ini
    Seems works!
    Great thanks!!!

    After test many plugins (imsgallery, nextgen and other) yours ‘ungallery’ is “simple the best” — simple and fast.

  • Hey, great! Thanks for letting me know.

    Very glad to hear you are enjoying UnGallery.


  • borisa

    Hi ,
    Let me introduce myself. My name is Borisa Djuraskovic. I am associated with Web Hosting Hub. Your UnGallery plugin at http://markpreynolds.com/technology/wordpress-ungallery is very interesting. I want to translate it to my native language Serbo-Croatian.
    Do you mind if I do so?
    Please let me know!!!
    Borisa Djuraskovic

  • Hi Borisa,

    Very sorry for the long delay. I missed my notification of your comment, somehow. Of course, you are welcome to translate, extend, and re-use UnGallery in any way you like.

    This goes for anyone else in the future, as well. My develop time for UnGallery is very limited these days, so anyone willing to put in effort, has my complete blessing.


Leave a Reply





Subscribe without commenting