Dynamic jQuery Image Gallery with Uploader

Here’s a jQuery Image Gallery script with a multi file Uploader, that was implemented using three resources that I found on the web: uploadify ad-gallery class.upload.php click on the image to see a demo It’s easy to find a lot of good image galleries out there, a lot of upload scripts and thumbnail generators. But […]

From our sponsor: Ship fast and never break a thing with Shortcut (formerly Clubhouse.io).

Here’s a jQuery Image Gallery script with a multi file Uploader, that was implemented using three resources that I found on the web:

  1. uploadify
  2. ad-gallery
  3. class.upload.php

click on the image to see a demo

It’s easy to find a lot of good image galleries out there, a lot of upload scripts and thumbnail generators. But I found it hard to find one script that includes them all, so I decided to try to integrate them in one, which is actually what is interesting to have in a site. I basically put them together and added one or two functions to the whole thing, and added some Ajax script to load the pictures.
So now, besides being able to see the gallery, which is pretty cool by the way, you can upload multiple image files (for this demo just jpg and gif, although you can configure what you want) next to it and have them added to the gallery on the fly, after the upload is finished (you can click on “last uploads” in the demo to see the last images). If you don’t want that the images are loaded immediatly after you upload them, then just remove the onAllComplete option in the innitialization of the uploadify plugin, in index.html.
Because this is a demo I limited the pictures size that you can upload to 500kb, and you can just upload 5 at a time. Of course then you can configure this as you like.
For the thumbs and images generator, I use the class.upload.php script  (very nice work), and I call it in the file uploadify.php. There you can configure the way you want your pictures to be generated, both original and thumbnail (for example the sizes, the filenames, the maximum size, if you want that pictures with the same name are replaced …). For this script I generate a hash for the name of the files, which will be always different. You can change that if you want… Remember that the folder where the pictures are stored (images and images/thumbs) should have the right permissions in order for you to upload your files.

I would suggest that you take a look at the possible configurations for each one of the scripts that I used:

  • for the class.upload.php here
  • for the uploadify here
  • for the ad-gallery here

see the DEMO

download source code here

You can find more jQuery Image Galleries here

If you have any suggestions for this script, or if you find some bugs please let me know.

Tagged with:


Chadking is an absolute geek that rarely leaves the comfort of his 3-screen desk. He is a self taught programmer and is addicted to all possible legal drugs.


Stay up to date with the latest web design and development news and relevant updates from Codrops.

Feedback 44

Comments are closed.
  1. Would it be possible to configure this so that the image uploader is on a different page than the actual gallery so that it could be used as an admin feature? This way the admin could easily upload images that are then passed to the main gallery on the website.

  2. Hi there, this is ace, but how do you make the newly uploaded image display at the start? Thanks

  3. Pingback: jQuery Image Cropper with Uploader | Codrops

  4. it is very usefull solution for me , I added delete function on thumbnails, trying to integrate in drupal, its works – displays all images but upload didn’t works , (i think it path problem in ajax.php) any suggestions?

  5. Hi,

    Its a great script you have here, works very nicely. I am trying to implement a way of deleting images that have been uploaded. How would you go about this?


  6. Hey,

    I really like this great script!!! 🙂
    I have a question about modifying the image description: is it possible to change it to something else?


    • Hi,
      I didn’t consider that in this version. The aim was just to merge the 3 scripts mentioned in the post. I will consider that for the next version though!

  7. Hi,

    Thanks for the fast answer:)
    I see your point, this is cool merging indeed:)
    I’ll try to think of it..
    Take care!

  8. Pingback: uberVU - social comments

  9. Hey guys, is there any way to have categories for the galleries? Maybe if I upload a batch of images to an “x” folder, that’d be a category, how can I make that to be selectable?


  10. 3 Things that would make this gallery the perfect gallery solution:

    1. Adding a page after uploading images that displays the image with a field to enter and save a caption.
    2. Adding an function that allows you to create/choose and album for your images to be uploaded to. Adding an album page that displays a thumbnail from each album and opens the corresponding gallery.
    3. Adding a function to delete or hide images and albums.

    If I knew how to do any of this I would definitely contribute…

  11. Uploading a gif does not work in your demo, nor in my code. Anyone know a fix?

    The process member function keeps failing…


  12. Awesome gallery!!! It’s possible to not immediatly sow the image, previously an admin must approve or reject the image uploaded? Thanks!!!

  13. Hi Chadking, i’m a great fan of ur samples but on this, i’ve been having problem with the jquery-uplodifier script b.cos it refuses uploading any file i select to upload. I also downloaded the other sample with different pages for uploading files and gallery, yet, the up-loader refuses to work out. pls help me out on this..i would be very grateful if my difficulty is been attended to..expecting ur reply

    the problem is just that when i select the image file to be uploaded, the image(s) stocks on the uploader list and nothing else happens..please give me light on what to do

  14. You just saved me a lot of time. I’ve been using the AD Gallery script (and love it), but was working on the admin upload piece and now you’ve hit it out of the park! Awesome convergence of three great scripts. Thank you!

  15. Hi there,

    I love this application. I have it up and running and adjusted it to my needs. I am uploading on the admin side and showing it on the web side. But now I need to let it show by category. Now I don’t know enough js to solve my problem. On the ajax.php script, I need to dynamicly change the $dirFoto and $dirThumbs like this:
    $dirFoto = ‘uploads/’.$Cat.’/foto/’;
    $dirThumb = ‘uploads/’.$Cat.’/thumbs/’;
    where the $Cat should be caught from another script. Now I’ve tried it with (PHP) $_SESSION, but it does not find the $Cat. I’ve tried several other things, but now way. I guess it is not possible in the ajax.php script. But how do I solve this?