Lemmy: Allow image uploads

Created on 18 Aug 2019  Â·  5Comments  Â·  Source: LemmyNet/lemmy

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.

enhancement

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.

All 5 comments

This is something I'm gonna hold off on for a while, for a few reasons I can think of:

  • Massively expanding the size of the DB, meaning I wouldn't be able to handle growth too well bc I'd be doing this for photos and videos. Like without images, I could store the entire wikipedia english text DB on my cheap VPS (its only 12 GB without images, 23 TB with).
  • Image hosting needs basically what torrents do. Decentralized hosting, but also unique / by an image hash, which there's a few good algorithms for. This needs a dedicated solution possibly similar to peertube, maybe webtorrent or just torrent based. I have a few ideas but haven't started anything yet, but its definitely frustrating to see the same meme posted to FB, twitter, reddit, mastodon, imgur, all of them hosting the exact same thing and none of them sharing the upload cost.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shirshak55 picture shirshak55  Â·  5Comments

miki725 picture miki725  Â·  6Comments

marek-lach picture marek-lach  Â·  6Comments

Nutomic picture Nutomic  Â·  4Comments

fsondej picture fsondej  Â·  5Comments