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

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!