Have your own photo gallery in 5 minutes using free software

Have your own photo gallery in 5 minutes using free software


Do you like gallery tools such as Flickr, but want to control your photos, or get rid of any of their limits? Now you can have your own custom gallery using PHP, a script called Picy, and 5 minutes of your time!

Before you begin, you’ll need a web host that supports PHP with GD, GD2, or ImageMagick. If you don’t have a web host you can pick one up cheap at a small orange (US$25 a year, US$35 a year with a domain, hard to beat that). If you’re too cheap to buy hosting (or want the geekiness that goes with having your own server) it’s possible to set up your own web server for free using just free software.

If you want to set up your own server make sure (if you have a router or firewall) that the port 80 is forwarding to your PC and open. Windows users can download WAMP server and install it to get an instant web server. GNU/Linux users will need to follow their distros instructions to install Apache and PHP.

Minutes 1-3: Once you have a web server for your gallery, upload all of your photos to a folder on the server (perhaps /photos). If you have your own server, simply move it to that directory in your public HTML folder (for WAMP, click on the WAMP icon in the system tray and click "www directory"). When using FTP the public files are using under "public_html" or "www" in the FTP folder list.

If you are using Picy with the PHP GD extension (with WAMP you can enable GD by clicking the WAMP icon in the system tray, selecting "PHP Extensions" and checking the item called "php_gd2.dll", most web hosts will already have GD enabled, if not they will usually be happy to enable it if you send them an email) you’ll need to ensure your photos are in PNG, GIF or JPEG/JPG format. Most digital cameras and scanners use JPEG, so you should be all set. If you need to change the format of a lot of photos (such as from .tiff or .raw formats) you can use something like XnView (free for non-commercial use) to batch covert them to JPEG.

Minute 4: Now that you have all your pictures in a single folder, it’s time to install the Picy script (Creative Commons licensed). Head over to the Picy homepage and download the latest version. Then extract it onto your PC and rename the picy.php script to index.php.

Minute 5: Finally upload index.php to the same directory on your server where you uploaded your photos (/photos in my example). Now just point your web browser to the folder your photos are in on the server (for WAMP users just go to http://localhost/photos) and see your pictures in action!

Advanced Stuff: If you want to custom configure your Picy gallery, open the "picy_manual.html" file in the Picy package you downloaded and look over the configuration section.

That’s it! Yet another cool project you can do with free software in less than 5 minutes. See you next week!

Category: 

Comments

Lopo Lencastre de Almeida's picture

"Do you like gallery tools such as Flickr, but want to control your photos, or get rid of any of their limits?"

Sorry to ask but, how in earth will Picy be a contender of Flickr?

There are at least 10 that are as easy as this to install, with or without database backend (sometimes with both like Singapore), in PHP, Perl, Python or Ruby and that are really very powerfull and able to be thought as potential Flickr replacements.

A few examples, some with almost the same features than Picy but, at least, much better presented:

  1. Pyxy
  2. Ajallerix
  3. 2bGal
  4. Coppermine
  5. Menalto Gallery
  6. ZenPhoto
  7. gCards (not quite a Gallery)
  8. Singapore
  9. Snaps!
  10. Simple Picture Gallery Manager
  11. PhotoStack
  12. Instant Photo Gallery
  13. Plogger

Not even to mention the several integrations from some of the above galleries with the blog system Wordpress or any other integrations that turn many of this applications full fledge tools coparable with services like Blogger. I just mention three below.

  • PhotoBlogger
  • PixelPost
  • Birch
  • FolderBlog

And this is not a "mine is better" flame war. I don't believe in those kind of wars and those links above are not sorted by any particular reason.

Free Software offer us so much variety with upmost quality that the dificulty is what to choose, even in what regards such simple programs like Picy.

This is a good example of a script to make a gallery fast, I agree. But it is not something that we will offer to someone Flickr'ed and non Free Software savvy instead of his/her precious tool. And this magazine, has I understood it, is for the general public, right?

Sorry to say this but yours, although well intended I'm sure, is the kind of article that gives bad name to Free Software when presenting it as something so naive and not at all professional.

Sorry if I sound hursh but my english is not as round as it would be if I knew more of it ;)

Best

Robin Monks's picture

I'll be sure to mention these in the next column, I wasn't aware most of these existed. Thankfully free software gives extreame diversity, which a dozen plus project for any task.

Thanks for taking the time to respond. Also, I'd like to note I wanted to have this as newbie friendly as possible, and to be a single user solution. For a single user, this can make a nice flickr like gallery from a folder of photos with zero config, even though it it's as powerful as flickr, it has no upload limits :)

Thanks again,
Robin

Terry Hancock's picture

Web photo gallery apps are a dime a dozen, actually. This is one of the most common things you'll see if you regularly scan Freshmeat announcements. Another is full-fledged CMS systems.

I used Zope, combined with my own 'VarImage' scalable image object for Zope to create my own highly flexible photo galleries. It's so simple to make a gallery using a combination of Zope Folders and VarImage that it's hardly worth trying to package it as a gallery product (not to mention the huge amount of competition). I liked the flexibility of writing the page templates and scripts for each site, so I never saw much point in creating a "gallery product". I use VarImage everywhere, though, and have set my Zope instances up to use it as the default image object.

(You can get VarImage from my SourceForge site:
VarImage Release Page ).

I originally created it as a utility for a CMS system I was working on, but it was easy to package and a few other people have found it useful. Basically, it treats the image as a directory name, and the file name within the directory is actually a command to generate the image. It caches command calls internally in a fairly conservative way so that regens happen almost never in practice (but are handled automatically if you change the referring page). Version 2.4 added a number of limiting features to avoid obvious DoS attacks and other abuses. It also got the referer blocking to work correctly. There's a plugin architecture so you can define new operations that can be performed. The distribution includes obvious things like scaling, cropping, the foveal cropping algorithm (the main use for galleries), color conversions, composition with "sub-images", drop-shadow, and
so-on. The referer blocking can throw an error, deliver an alternate image, or deliver the same image with reduced size, color, or a watermark.

Of course, it only works in Zope, but it's handy. ;-)

mfarney's picture
Submitted by mfarney on

Have you noticed how one can have a website with a gallery, Twitter live, blog, forum or whatever else one might desire...all for free? The Internet has come a long way. I really like the gallery templates and they seem pretty easy to embed. Thanks for the article.
______________
Mathew Farney

Author information

Robin Monks's picture

Biography

Robin Monks is a volunteer contributor to Mozilla, Drupal, GMKing and Free Software Magazine and has been helping free software development for over three years. He currently works as an independent contractor for CivicSpace LLC