I’m turning off comments due to the amount of spam. Also, I’m no longer supporting this plugin. Time to move on.

Let me publish my first plugin: EasyPermGals.

EasyPermGals is based on easygals by Walter Vos. Where easygals allows you to manually activate the automatic gallery feature on a per-post/per-Page basis, EasyPermGals does this automatically. Each and every post or Page is checked for attached images which are then displayed in a neat gallery underneath.

Lightbox, if installed, may be used to view the full-size images.

After a feature request (along with a donation), I added the option to switch between manual and automatic thumbnail attachment. This allows you to define, exactly where the thumbnails are supposed to be embedded. Another request was the ability to call the automatic gallery within the theme files, so I added this as well. And since I like posts and Pages to have pretty header images, you can now upload an image, tag it with a title that includes [header] or [exclude], and the image will be shown in above the post/Page content. Obviously, [exclude] will ignore the image and not show a thumbnail in the list. This lets you use images inside your posts instead showing up in the gallery.


  • Admin options for lightbox support and style rules
  • Customizable code-bit to help optimize embedding
  • works for posts and Pages (something that was important to me)
  • Full-Auto and manual mode


See it in action throughout this site. An example of the images that are attached to a post can be seen here, and this is what it’s like when it’s a Page, that has images attached to it.

Actually, there are 2 images attached to this post

Installation is simple:

  1. Download EasyPermGals
  2. Unzip
  3. upload easypermgals.php to yoursite/wp-content/plugins directory
  4. activate
  5. customize

Like it?

Then write me an email or post a comment and tell me so, or


May 3, 2010 – **Version 1.9.2**

* Added a [noeasypermgals] option. Now, if you want to use the full-auto feature but turn it OFF for a reason, you can put this code anywhere in your post’s or Page’s content and the gallery won’t display.

December 24, 2009 – **Version 1.9.1**

* Thanks to Frank for pointing out an error due to incorrect encoding of the file. Should now be fixed.

December 22, 2009 – **Version 1.9**

* Added No-Tooltip as option. My solution to prevent ugly mouse-over tooltips did not work with all lightbox installations so I made it optional.
* Tested with WP 2.9

Febuary 18, 2009 – **Version 1.8.1**

* removed the „title“ tags for the header and thumbnail images. A lot of users mass-upload and end up with weird titles in their pictures, which don’t look pretty when you get those yellow tooltips.
* added width and height to the header image since one of my own themes didn’t like not knowing image dimensions 🙂
* realized I need to rewrite the whole thing. It’s totally inefficient and has numerous bugs, like when you have a header image attached, it will still output the „before“ and „after“ stuff you can set in the options. If this is bothering anyone, please donate. Donations motivate me to fix things 😉

November 25, 2008 – **Version 1.8**

* more template tags. I previously loaded the full size image and displayed it in a reduced size … now you can extract the medium sized pic as well.

* some bugfixes, like the missing border=0 definitions in the image tags etc.

October 27, 2008 – **Version 1.7**

* template tag with options … I needed header thumbnails 🙂

October 27, 2008 – **Version 1.62**

* Needed to call the header without the img tags, so I added a template function. This allows me to resize it to whatever I need, use as background image or whatever.
* Some other bugfix, I forgot what it was

September 7, 2008 – **Version 1.6.1**

* Found a major bug that caused malfunction when using [easypermgal] or [nogal] in the non-full-auto-mode. Works now.

August 28, 2008, later in the evening – **Version 1.6**

* Added the ability to use easypermgals in your themes. will return the list of thumbnails, will give you the header image. Actually per request from Sören

August 28, 2008 – **Version 1.5**

* Added the possibility to use [header] or [exclude] in the image title to make the image not show up automatically. The plan is to make EasyPermGals add an image that is titled with a [header] bit to show up above the post

August 19, 2008 – **Version 1.4**

* Was missing image titles, captions and descriptions … lightbox now shows captions

April 24, 2008 – **Version 1.3**

* Added the option to switch between manual and automatic mode.

April 11, 2008 – **Version 1.2**

* Admin options extended. You can now set the separating character as well as the bit of code that you may need to add before and after the EasyPermGals container.
* Also made the options menu prettier

April 10, 2008 – **Version 1.1**

* made EasyPermGals compatible with WordPress 2.5

* EasyPermGals now returns null if no image attachments exist
* released it to the world.

Remember, if you like it, send me an email, or post a comment, or

54 Gedanken zu „WordPress Plugin: EasyPermGals

  1. I like it. I was wondering if instead of showing the images underneath each post, if it would be possible to only display attached images if a tag is embeded in the post such as [easygal] or something like that. Perhaps with a toggle on the settings page which would let you switch between the two.

  2. Well, anthony, in that case you’d like to try Walter Vos‘ EasyGals, which requires you to do just that: insert a tag to display the images.
    EasyPermGals just adds them automatically.

    A „switch“ to toggle would be a neat thing. Let me think about it. Ideally it should be a checkbox in the regular write post/page area to set thumbnails yes/no.

    BTW: Walter contacted me regarding WP 2.5 compatibility. If the downloaded version does not work, contact him directly. There’s a change in the thumbnail feature in WordPress 2.5 which requires our plugin to check if it’s an old or a new thumbnail.

  3. Hi, I’ve downloaded and installed this plugin but I don’t know how to use it! I have turned on the „full-auto mode“ but it does not recognize the links. how is it supposed to work? I have only added some image links to my page expecting your plugin to do the rest. Can you please put a code example of how to use this plugin manually for noobs like me!? Thanks for your support.

  4. The plugin automatically lists all images attached to the post or page.
    „attached“ means that you use the integrated file-upload feature; you click the browse button, select your image from the hard disk and upload it.
    I suggest you write a post first, then publish it and check if it’s online. Then you go back and edit the post to attach the images.

    On the other hand, there might be a bug that I thought I squashed; try deactivating full-auto mode and saving the settings, then re-activating full-auto mode.
    There might be a glitch in the initial settings when installing, it would be nice if you could confirm that.

  5. Thanks for your reply. I was expecting this plugin to make a gallery using links to images but now I get that I must upload the images in my post (and that is reasonable). Unfortunately because of some errors, I can’t upload images in any post; so I came up with making my gallery manually.

  6. Right, EasyPermGals just works with attached images.
    Check your directory permission via FTP … that’s usually the first problem with image uploaders. Look for something with CHMOD 😉

  7. hi mores
    i wrote some post on wordpress forum and you answered me a couple of time..this is the post
    i used your plugin easyPermGals, then i momentarily deactivate it to use it later but i have some weird stuff going on in my templates. I read somewhere that some plugin store cache pages in wp db. Is your one of them? if yes is there a way to clean that cache?
    if not just ignore me:)
    Thanks vitto

  8. You need to remove the easypermgals_header() code from your template as well … if the plugin is deactivated, this function is not found and WordPress will show you an error.

  9. Hi Daniel. Great plugin. I was wondering there is a way the plugin can find pictures from posts already published. I notice it parse only posts published after its installation. Secondly, is there a way to have the thumbnails on the gallery link to their respective post urls instead of the picture urls? Can you please help.

  10. The plugin parses all images attached to posts – new posts as well as old ones. Important is the fact that you used the „upload image“ feature in WordPress, since this way an uploaded image is associable with a post.
    As to changing the links … you will need to edit the plugin since I don’t have time to add this as a feature just now. Edit easypermgals.php, go to line 52 and change wp_get_attachment_url to wp_get_attachment_link (twice). I think that should do it.
    But it’s a nice suggestion, I can think of a switch to turn on/off linking to post urls instead of the images directly.

  11. Hello Daniel

    I am using your plugin and i want the image thumbnails to link to an attachment page instead of the image url.

    I followed the tip you gave to Palin but it doesn’t seem to work. First of all, Line 52 does not have that particular code. It has something else.

    What is the appropriate hack for this current version i am using? (Latest version)

    I see wp_get_attachment_url($picture->ID) on line 103.

    How do i make this direct to an attachment link? By simply replacing url with „link“ doesnt work.

  12. You need a better editor 🙂
    Yours obviously wraps lines – turn line wrap off then you should have the „proper“ line numbers

    Yes, you need to change the FIRST instance if „url“ to „link“, the second one displays the thumbnail so you need to leave it the way it is. So, change
    $this_easygal .= "ID) . "\"$lightbox title=\"".$title."\">ID) . "\"$lightbox>";
    $this_easygal .= "ID) . "\"$lightbox title=\"".$title."\">ID) . "\"$lightbox>";
    SHOULD work … must try it first.

  13. Es gibt kein deutsches Plugin, weil ich das mit der Internationalisierung bisher noch nicht kapiert habe.
    Es ist aber nicht sehr kompliziert, mein Plugin … möchtest Du das Plugin auf Deutsch, oder die Installationsanleitung?

  14. I love this plugin, thank you! I’m hoping you can help though. I’ve embedded [easypermgals] in my post and it works great but on my homepage (index.php) I’d like it not show at all, it displays as blank space in my paragraph.

    Is there a way to embed that code and for it only to take effect in my single posts, not on my homepage?


  15. Hmm, I think you need to change your index.php file to show the_excerpt() instead of the_content().
    Alternatively, try using easypermgals in full-auto mode, where the images are attached to the end of the content automatically. If you use the_excerpt() on your front page, no images will be shown.

  16. Thanks for the awesome script! I am currently at my wits end trying to get lightbox 2 and your plug-in to play nice with each other, however when I click on a thumb, I only get an image appearing on a different page as shown here:

    Any help with this to get these working would help immensely!

    Thanks in advance,

  17. Lightbox does not seem to be installed properly – the javascript is not loaded in your header. EasyPermGal implements the necessary „rel=lightbox“ code.
    Have a look at your lightbox plugin – is it activated?
    If yes, check your theme’s header.php file to make sure it includes < ? php wp_head(); ? >.

  18. Sorry for the lack of clarification.

    When I click on „NEXT“ in an image set, an image renders twice instead of showing up just once in the lightbox.

  19. Okay, seems like your lightbox installation does not support the „trick“ I used to prevent those ugly yellow tooltips which basically involves linking to the image twice.
    Give me a few hours, I might either send you a modified plugin file, or add an option to disable it in the admin.

  20. Frank, I update the plugin to add an option for the no-tooltip trick.
    Update the plugin, it should work right away. If not, go into the options and activate, then deactivate again.

  21. Daniel,

    I’ve been working with Frank on creating his blog and I just made those updates for him. It works beautifully! Thank you so much for taking the time to fix this so quickly and immediately for him. You rock.


  22. Yes Daniel, thank you for taking the time to work on these issues. Although another has popped up. Whenever I’ve make an update (saving a post, editing a post, or edting anything at all to my blog) I get a warning message page that says the following:

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/34/d90246755/htdocs/dlrfoto/wordpress/wp-content/plugins/easypermgals/easypermgals.php:1) in /homepages/34/d90246755/htdocs/dlrfoto/wordpress/wp-includes/pluggable.php on line 865

  23. First, disable EasyPermGals and see if the problem persists.
    If it does not, try the EasyPermGals.php file I’ll be sending you, it might be an invisible character in the code.

  24. No problemo. I know what it’s like to be ALMOST there but not quite … and you’re dependent on a programmer to just fix a minor issue …


    Thanks for testing, it was a problem with the encoding of the php file, I must’ve mucked up something. I’ll deploy the new version now!

  25. Hi,

    Thanks for a great plugin! However, i’m having some problems.. In the backend of WP, i now get error messages since i installed EasyPermGals.

    PART OF THE ERROR MESSAGE: „Warning: Cannot modify header information – headers already sent by“ and then it say the EasyPermGals file.

    Im running WP 2.9.1. Do you know what could be wrong?


  26. Are you sure you’re using the latest version? There was a problem with the encoding of the php file – I fixed that and uploaded a new version (1.9.1) on the 24th of december.

  27. Hi!

    I double checked and i have the latest version, 1.9.1.. When updating a post just now i got the following error message:

    Warning: Cannot modify header information – headers already sent by (output started at /home/web31343f/domains/utansmink.se/public_html/wp-content/plugins/easypermgals.php:1) in /home/web31343f/domains/utansmink.se/public_html/wp-includes/pluggable.php on line 868″

    Any idea?

  28. Found an error in your code:

    <div class='easypermgals' style='‘>

    It should be:

    <div class='easypermgals' style='‘

    Because of this the gallery starts with ‚>

  29. Thanks for the info, Milli. I’ll have a look at the style thing …
    But why the edit media function would no longer function is beyond me … are we talking about editing the title, description etc. of uploaded files?

  30. It seems there is an incompatibility issue between 1.9.1 and latest WordPress, 2.9.2.
    Anyone else experiencing this?

  31. Get it… Another encoding issue? I downloaded a fresh version 1.9.1 from WP database. Anyway, I opened the easypermgals.php file, at the very end added a line feed, save, and everything was ok.

  32. Probably.
    I don’t know what’s going wrong with these files, lately. Somehow „TextWrangler“ is more of a „TextMangler“ 🙂
    Good job fixing it, thanks for pointing it out.

  33. Is it possible to not have the gallery on just one page (home page)?
    I’ve tried the [exclude] tag on all the pictures for that page but Easypermgals will still generate an empty gallery.

  34. Unfortunately, no, at the moment this is not possible.
    I’d need to insert a [NoEasypermgals] option, where you put that into your content and it prevents the auto-gallery from showing.

    But I can’t do that at the moment … maybe in a few weeks I can look into it.

  35. Well, I couldn’t let it go 🙂
    Download the new version, use [noeasypermgals] to make the gallery not show up.

  36. hi
    i’m just finishing development on a site using your plugin and its wonderfull for none tech users, there seems to be a bug that some times the new image does not load on click of the next or prev , but the image number does change and the image refreshes(but stays same) unsure if its the plugin or the jquery lightbox plugin

    i’ve upgraded to 1.92

    any help appreciated!

Kommentare sind geschlossen.