There is no reason to rely on external, centralized sites like imgur. That compromises user privacy, because every user will make requests to that external website.
Mastodon also supports direct image (and video uploads), and that works totally fine. Bandwidth is not a problem because every instance will cache the image for its own users.
This is something I'm gonna hold off on for a while, for a few reasons I can think of:
I agree that relying on imgur, or even a better image host isn't as secure as making all requests to one domain.
Storage is cheap, so I wouldnt worry about this too much. For my Peertube instance, I pay 10 € for 2 TB of data. By the time you reach that amount with images alone, there will be a lot of users (who will also be willing to contribute with donations).
That sounds exactly like the use-case for IPFS. Dont know if there is a Rust library, but if so, it should be relatively straightforward to implement.
For now at least in a recent commit related to #253 , I added a button that just links to https://postimages.org/, a decent imgur alternative that provides good direct and markdown links.
I looked a bit into self-hosting chevereto, but it isn't as clean as postimages, and cheveretos insert plugin didn't seem to work with lemmy. Plus I'd have to add some external configuration to allow instance admins to specify what image host if any they'd use.
But you dont need any image host, you can just store the image files on local disk. It wont take much storage or bandwidth at the current instance size. And later we can still look for an alternative. Anything is better than images hosted on amazon or google servers.
Okay I found a self-hostable one called PictShare that has an open API. It'd basically be as simple as adding it to the docker-compose, and just a little wiring up. Also use filepond for the upload js. Or just simple file input
Most helpful comment
Storage is cheap, so I wouldnt worry about this too much. For my Peertube instance, I pay 10 € for 2 TB of data. By the time you reach that amount with images alone, there will be a lot of users (who will also be willing to contribute with donations).
That sounds exactly like the use-case for IPFS. Dont know if there is a Rust library, but if so, it should be relatively straightforward to implement.