JustPics – Your own personal twitpic. 23 June 2011

git clone https://cwninja@github.com/cwninja/justpics.git

source on github

A little while ago twitpic change their terms and conditions making it so they owned all your pictures.

People[1] got all pissy, as people do. So I made justpics. It's a very simple image hosting site that you can host yourself, on your own hosting, using your own s3 bucket.

It can even do some basic URL shortening for you, just because.

It's fully compatible with the Twitter iPhone app, just set it as a custom image hosting service.

a man in a cow suit

Design intentions

It's designed to cost as little as possible in S3 bills and to be easily hosted on Heroku.

Files are stored on S3 as a SHA of their contents, so all URLs are immutable, and can therefore be cached forever. This allows it to fully exploit Heroku's Varnish cache, along with ISP and local browser caches.

Because Heroku is hosted within Amazon AWS, you (theoretically) don't get billed for S3 transfers, just the storage costs. So it's piss cheep to run.

If you wan't to, you can even host it as a rails engine or as a middleware inside another app.

Skip to the end…

So now you have all the tools you need to build your own image hosting application. Setup instructions are available in the README file, and the code is available on github, all published under the WTFBPPL.


[1] Well, internet people.