Lumira
With public image hosting services blocking the UK more and more, I ended up rolling my own.
I don’t often use image hosting services, but it’s very occasionally useful and thanks to the Online Safety Act an increasing number of them have taken the not unreasonable position of blocking the UK rather than jumping through increasingly pointless hoops for the entertainment of the UK government.
Rather than find a new service and hoping that the same fate wouldn’t befall it, I decided I should probably self-host the solution. The wish list was fairly simple, but slightly unusual:
Easy to deploy onto shared hosting - While I can (and do) host stuff myself, given this is a small background service it makes sense to be able to just dump it on any old shared hosting and forget about it.
Support OAuth authentication - I’ve got an Authelia instance already that handles authentication on other websites, so it makes sense to lean on that rather than re-inventing the wheel all the time.
Support Remote Image Store - While the default option is to store images on the shared hosting where the script is, if it ends up in a very small plan I’d want it to be able to sftp the files onto another web server.
Prototyping
I didn’t immediately stumble across any existing options that handled authentication the way I wanted, and it felt like such a trivial little task that i decided to build it myself.
A rudimentary trial came together pretty quickly, and proved that it does basically work - but it was the sort of “thrown together in an afternoon” thing that meant it probably shouldn’t be allowed out into the wild, or even exposed to the internet.
This is, obviously, a problem.
Productionising
So I resolved to make it “properly”, so that it was (a) in a state that i was comfortable leaving exposed online, and (b) shareable in a form that might actually allow anyone else to run it.
(on point b, I am not in any way deluding myself that anyone will ever download this thing but that’s fine. At least it’s there)
So, it’s now a lot more configurable. It’s probably reasonably secure. It’ll run happily on shared hosting, but should be tolerant of whatever weird and wonderful ways you like to deploy your websites.
But… there’s a caveat to all of this. There has been (a small amount of) AI / LLM usage. I wrote all the PHP code, and I examined everything else, but if you’re a purist then… there are a hundred other image upload tools, and they probably haven’t all used (or admitted to using) forbidden technology.
(if you really want to know my ‘moderate’ take on AI, you can have a read through AI Is A Tool
Anyway, I didn’t mean this to turn into a “yes I sometimes use a tool people don’t like, but I know what I’m doing so it’s ok” rant; if you want to look at the project - or even use it! - you can find it over in it’s Codeberg repository at codeberg.org/ahnlak/lumira.