Taking, managing and sharing photos is a hobby for a lot of amateur photographers like me. Some photographers create hundreds of gigabytes every year that they need to manage and be able to share appropriately. Through the years, I have navigated different solutions and finally settled on a self-developed, simple and powerful system that I am now sharing as an open source package.
Why create another image sharing platform ?
Conventionally image sharing is either done on the cloud with Google/Apple/Amazon, within social media platforms. This approach causes issues with privacy, with the data being used (and abused) by the platforms. It is also network-heavy to have to upload and download the content to access it online, whereas a large amount of the operations and viewing could be done within the home network without using unecessarily 3/4/5G or cabled networks. The Shift Project explains very well in this article why we should limit network usage.
My own voyage started early in 2007 with Picasa Web Albums. It provided a host of great features:
- Local software to view and curate photos,
- A web upload tool specifically for these photos I would share with family and friends,
- Simple secure links for sharing safely within a small group.
When Google merged Picasa to Google Photos and stopped supporting Picasa, I couldn’t adhere with the cloud first approach and looked for a replacement. Other contemporary platforms (think Flickr) didn’t provide the simple features I needed (upload, categorisation), so I bought a low-power home server with a media management suite and planned to use it for my purposes. This server was very useful in many other ways, but the media server didn’t quite manage to replace Picasa in my heart…
That kicked off works on my own web application for photo sharing, based on Symfony framework, Bootstrap; a simple but sufficient way to view all my photos from any devices in my home. I also use it to share secure, mobile friendly albums with friends, without all the bells and whistles of cloud solutions, and with an ergonomy which fits me and some visitors better.
How does it work?
Computers on the network use a SSH dual synchronization with the server using the excellent Unison software to update the central server and receive new photos. This allows photos to be backed up on multiple devices.
Photos shared on the web should be optimised for the device and specific use. This means a slideshow picture is better in the range of 100-300kB, while a thumbnail should be restrained to less than 10kb. Owing to the low computing power of my server, it’s best to pre-calculate images and videos on the clients, during the upload. I’ve therefore created a plugin using epeg to resize images and ffmpeg for videos. This allows to run very efficiently, because resizes are calculated while originals are transfered to the server, adding very little time overhead from simply copying the files. These scripts are not yet open-sourced, as I am working on generalising them to different servers and desktop OS.
How to install it?
The application is available as a symfony bundle. To install it, you need to
- create a new symfony application
- Configure security for the application
- Install and configure webelop/album-bundle with composer
- Create a Vhost for the application
For improved performance and security, you might want to install a Content Delivery Network (CDN) between your site and the viewers. I used Cloudfront from Amazon Web Services. For a minimal cost pages and videos are then cached and distributed from outside my home network, closer to the users.
Installation details are on the github repository
What remains to do?
As of February 2020, the following features should be introduced
- Release the synchronisation script in Open Source
- Pagination on the albums / folders
- An icon selector for the tagging interface
- Create a more extensible strategy for resizing on the server
- A Symfony recipe to make the installation truly easy
- Information on securing the installation, using HTTPS and CDNs.
There are also more advanced features that we will consider later. To name a few:
- Theming
- User login for viewing albums
- Comments for logged in users
- Show image meta-data
I will update this blog when these features will become available.