Lightweight image host
I’d like to start hosting my own images in one central spot, maybe for all my websites. This would have three benefits:
- It would keep binary files out of the repo for any version-controlled flat-file sites.
- I wouldn’t have to think about implementing image management in each separate project.
- There would be a single workflow for uploading and using images across all sites.
I have in mind a few simple parts:
- A PHP script for uploading images. This would sit behind basic HTTP auth (over SSL of course). The entire page would be a drag and drop target for files.
- Images would be broken out into various common sizes and optimized via ImageMagick or TinyPNG API call. Also stripping out any EXIF data. This would happen either right at upload time or via a cron job.
- A PHP script that list all uploaded images in a sortable table, just using a directory listing of a particular folder. Click on an image and a popup shows the image and quick-copy links to each size variant in Markdown, HTML, and Pollen markup formats. This part could be public.
- Eventually: a gallery view