Image Vomitorium

Image Vomitorium is a simple image upload script in Perl (previously PHP) designed to be a single-user replacement for services like ImageShack, WaffleImages, etc. It's free for anyone to use or change. Password authentication is achieved by some .htaccess files included to protect the upload script while leaving images public (see README for details).


Image Vomitorium 2.0 [.tar.gz] (new Perl version)

Image Vomitorium 1.2 [.zip] (last PHP version)

Image Vomitorium 1.1 [.zip]


A non-functional demo of version 1.2 is available. Version 2.0 adds URL loading, but is otherwise the same.


2.0 - Rewrote in Perl
      Centralized CSS and prettified
      Added URL loading
      Numerous bugfixes
1.2 - Add option to limit filename length in gallery
      Added a bit of prettiness (it's blue now)
      Added a usage note to the gallery
1.1 - Add gallery, documentation, rolled it into an actual package
1.0 - Initial release (now lost to the ages)


The included readme file:
Image Vomitorium 2.0 by Tyler Bletsch (tkbletsc (at)
Image Vomitorium is a dead-simple image hosting script.  It is designed to 
easily let you create your own replacement for imageshack, photobucket, etc. 

 - Allows you to upload images
 - Generates thumbnails by
    - Executing an external program (like ImageMagick's "convert" tool)
    - Using the GD perl module
    - Using the Image::Magick perl module
 - Responds with URL, HTML code, and forum code to display the image
 - Gives you a very simple gallery to review uploaded images
 - Templates for htaccess files are included so you can require authentication
   in order to upload

ANTIFEATURES (things it doesn't do)
 - No auto-deletion
 - No accounts (beyond what basic HTTP authentication can do)
 - No ads

Starting from the document root:

1. Go to where you want to extract it.         $ cd /path/to/mysite
2. Make a directory for it.                    $ mkdir imgvomit
                                               $ cd imgvomit
2. Extract the files there.                    $ tar xvzf /source/image-vomitorium-2.0.tar.gz
3. Give appropriate write permissions          $ chmod 777 img img/thm
   (skip this on Windows or if the web server runs as the same user as you)
4. Configuration (see next section)
5. Optional: enable login security (see SECURITY section)

To edit the settings, just open up and edit the variables.

The main thing to configure is the thumbnail generator.  If you have the 
ImageMagick command-line tool 'convert', then set $thumbnailMethod to "command"
and leave $convertCmd unchanged.  If this doesn't work for you, then try "gd"
or "magick" to use the GD or Image::Magick perl modules.

You can also configure the allowed file extensions, gallery configuration, and
so on.  The defaults for these are okay for most environments.

If you want to make your image upload facility private while still allowing
public access to your images, do the following (assuming you use apache):

1. Configure an htpasswd file OR some other means of HTTP authentication
    (man htpasswd or check with your ISP for details)
2. Edit htaccess so it refers to your htpasswd file, which should be in a
   private place (i.e. not web-accessible).
3. Rename htaccess to .htaccess
4. Rename img/htaccess to img/.htaccess

If you do NOT want to require a login for your Image Vomitorium, just delete
the htaccess files.

To upload from disk:
 1. Pick a file.
 2. Hit "Vomit File" to upload it.
 3. Link to it using the URL or the linking code provided.
To upload from a URL:
 1. Paste a URL.
 2. Hit "Vomit URL" to upload it.
 3. Link to it using the URL or the linking code provided.
To see uploaded images:
 1. Click 'Gallery'.
 2. You are now looking at the gallery.

This is free software; use at your own risk.  Author accepts no responsibility 
for the quality of this product.  Feel free to modify or distribute this code
without restriction.