27 votes

How should I host my images?

Imgur has been my go-to solution for uploading and sharing images and screenshots for years now, but I have become aware of some issues with the site's design that make it a pain for other people to use.

For instance, it's almost impossible to directly link to an image on Imgur, and not an image's page on Imgur. The mobile website experience is also not very good.

Imgur isn't just an image hosting solution either, it's also a social media site. The website seems to detract from the image sharing experience in order to promote its social media side.

I have no interest in that. I just want a solution to host my images so that I can syndicate them elsewhere.

It seems like, in true IndieWeb fashion, the best solution is to just host my images on my own website, and indeed that's what I will probably end up doing.

However, I have a few questions I wanted to ask, starting with recommendations for other websites:

Does any here have an Imgur alternative that they can recommend as a good image hosting and sharing solution?

I checked out a few sites, like Pixelfed, but it seems more like a federated Instagram alternative. Annoyingly, I can't demo the site before creating an account, so I don't actually know what the experience is like.


Assuming there are no recommended Imgur alternatives and I should just host my images on my own website, I would also like to know:

  • Should I be worried about "anonymizing" my images and messing with Exif data?
  • Can anyone recommend software for optimizing image sizes? (Linux friendly, command-line or otherwise scriptable utilities preferred.)
  • As a bonus, can anyone recommend software for optimizing GIF and video files for sharing online? (Same preferences as above.)

27 comments

  1. PendingKetchup
    Link
    I've used Pixelfed. It really is meant to be an Instagram-alike that federates, not an image host like Imgur. But you could try hotlinking to images on there and see how that goes. There are...

    I've used Pixelfed. It really is meant to be an Instagram-alike that federates, not an image host like Imgur. But you could try hotlinking to images on there and see how that goes.

    There are plenty of places to upload images that are just no-nonsense image hosts. But I wouldn't recommend any of them. I remember when Imgur started, and being a no-nonsense image host (mostly for Reddit) was the whole point of Imgur. Over the years, no-nonsense image hosts that see nontrivial usage will invariably accumulate nonsense, as they struggle to pay for the costs of serving big files to many people for free. You can pick one you like the look of right now, but 5 years from now you probably won't like it so much.

    You can self-host your images; if you're trying to fill the use case of Imgur, you probably want to run a (pre-written) web app for uploading and optimizing images instead of just dumping them in a directory. But then if your image becomes popular you suddenly need a CDN. Maybe put Cloudflare in front of it? You also have the problem of what happens to your images when you decide to take down your self-hosting server.

    I was always a fan of the ipfs.pics style of doing things, where the image host inserts the image into a peer to peer network, and you can send people to a CDN that gateways to the peer to peer network to get the actual image. That way you could self host without your images necessarily disappearing when your tiny server does. But I don't think ipfs.pics actually executed it very well: they ran their own gateway instead of actually using the (venture funded) main one, the uploader wasn't very polished and the whole project seems deprecated now. And maybe the Law of Accumulated Nonsense applies just as much to P2P network gateways as it does to image hosts.

    To host an image properly, you must first invent and widely deploy content-centric networking, is the real answer. All the other solutions are kinda bad.

    7 votes
  2. [2]
    emdash
    Link
    If you have the time and the inclination, you could build your own tool—understandably that's a lot of work, but it's usually a fun side project where you get to connect the lego bricks together...

    If you have the time and the inclination, you could build your own tool—understandably that's a lot of work, but it's usually a fun side project where you get to connect the lego bricks together and experiment. Do you want to store in S3? What's your URL schema going to be? It's a vertically integrated stack of fun.

    I run my own image hosting service on a dotnet core server, hosted on DigitalOcean, that stores uploaded files in a DigitalOcean spaces bucket (S3 compatible). From the client side, I built a simple Vue client side interface with drag and drop uploads, that shows the most recent files uploaded in the past few days, with helpful bits of functionality like one-click to copy the URL, and an auto-deletion setting to control how ephemeral the uploaded files are.

    I also built together a quick iOS shortcut to make it easy to upload images and files to my server directly from the iOS share sheet. I still need to write a macOS wrapper to hook into the screenshot event, which is my biggest thorn in my side at the moment.

    To me, ease of use is far more important than worrying about file size optimisation. In practice I've never found I needed to compress images on the fly—I end up doing it prior to upload usually. Obviously everyone's needs will differ, though. Regarding EXIF data, I don't currently scrub location and camera information, although I should. My images don't usually go to many people, and they get deleted pretty quick, so for now I just rely on pseudo-obscurity on that front.

    6 votes
    1. gpl
      Link Parent
      How long did it take you to set this whole system up? Sounds super interesting.

      How long did it take you to set this whole system up? Sounds super interesting.

      1 vote
  3. synergy-unsterile
    Link
    Check out the Privacytools.io recommendation for metadata removal tools (they recommend MAT2 or ExifCleaner). There's also a handy webapp for removing exif metadata and blurring sections of...

    Check out the Privacytools.io recommendation for metadata removal tools (they recommend MAT2 or ExifCleaner). There's also a handy webapp for removing exif metadata and blurring sections of images.

    Check out the Sharex custom uploaders for an idea of what other image hosts there are.

    @KapteinB also recommended https://put.re/ as an alternative to imgur

    5 votes
  4. [6]
    nu8
    Link
    Backblaze works for me, they have a small amount of free storage. Also you can direct link, example https://f002.backblazeb2.com/file/0Tl4aD/0RfmO1.jpg

    Backblaze works for me, they have a small amount of free storage. Also you can direct link, example

    https://f002.backblazeb2.com/file/0Tl4aD/0RfmO1.jpg

    4 votes
    1. ssgjrie
      Link Parent
      If you use B2 + your domain with Cloudflare, bandwidth is free (via the Bandwidth Alliance: https://www.cloudflare.com/bandwidth-alliance/ ) Wasabi provides a similar service as B2 and has free...

      If you use B2 + your domain with Cloudflare, bandwidth is free (via the Bandwidth Alliance: https://www.cloudflare.com/bandwidth-alliance/ )

      Wasabi provides a similar service as B2 and has free bandwidth (fair use).

      4 votes
    2. [4]
      StellarTabi
      Link Parent
      Have you considered using webp files to save on bandwidth costs?

      Have you considered using webp files to save on bandwidth costs?

      1 vote
      1. [2]
        ssgjrie
        Link Parent
        webp doesn't work on Safari/iOS. For good crossbrowser support, JPG, PNG, and GIF is better. What many sites do is to send a webp version to browsers that support it and jpg to those that don't......

        webp doesn't work on Safari/iOS. For good crossbrowser support, JPG, PNG, and GIF is better.

        What many sites do is to send a webp version to browsers that support it and jpg to those that don't... but that adds some complexity.

        1 vote
        1. StellarTabi
          Link Parent
          I heard it's in beta though, I'm personally taking the gamble that it'll work soon enough.

          I heard it's in beta though, I'm personally taking the gamble that it'll work soon enough.

          1 vote
  5. [3]
    crdpa
    Link
    On Firefox you can just right click the image on imgur and click "view image". It will go to the direct link.

    On Firefox you can just right click the image on imgur and click "view image". It will go to the direct link.

    4 votes
    1. [2]
      StellarTabi
      Link Parent
      On any mobile browser (that I know of), imgur will redirect you to the _d version which is resized. For large images (like infographics) only desktop users can actually zoom in to read the text.

      On any mobile browser (that I know of), imgur will redirect you to the _d version which is resized. For large images (like infographics) only desktop users can actually zoom in to read the text.

      7 votes
      1. crdpa
        Link Parent
        Hmmm... that's a bummer. Enabling "desktop site" on Firefox probably fixes that, but it's better finding an alternative hosting site.

        Hmmm... that's a bummer.

        Enabling "desktop site" on Firefox probably fixes that, but it's better finding an alternative hosting site.

        1 vote
  6. cadentius_aurelius
    Link
    I have recently taken to making gifs, and I have built a couple tools to make it clean. The first one is nothing more than a wrapper for FFmpeg that I use to quickly cut out a 10-30 second chunk...

    As a bonus, can anyone recommend software for optimizing GIF and video files for sharing online? (Same preferences as above.)

    I have recently taken to making gifs, and I have built a couple tools to make it clean.


    The first one is nothing more than a wrapper for FFmpeg that I use to quickly cut out a 10-30 second chunk of video that I want to gif. It has no fancy features.
    https://pastebin.com/3XaXJWZv

    snip /path/to/input/file.mkv 5:29 15 ~/Videos/gif/base.mkv
    

    The second one, loosely based on a blog post by Giphy, has three stages:

    1. Scale the source video down to a temporary video with the size of the final gif
    2. Generate an optimal color palette from the video
    3. Convert the temporary video into a gif, using the palette

    Command line options are inserted directly into the ffmpeg call in step 1, so you can pass FFmpeg options after the input filename. Use environment variables HEIGHT and WIDTH to control the output size, passed to the scale filter, or the FILTER env var to replace it with something else, like a crop.
    https://pastebin.com/PppXSSea

    mkgif ~/Videos/gif/base.mkv -ss 3 -t 10 -r 15
    
    HEIGHT=480 mkgif ~/Videos/gif/base.mkv -ss 3 -t 5
    

    I have made many gifs with this workflow. Here are a few.

    4 votes
  7. acdw
    Link
    What I do, and I realize this is a pretty specific solution, is host images with my Fastmail account. I get some amount of space (I forgot just how much) with my paid account, and I figure it's...

    What I do, and I realize this is a pretty specific solution, is host images with my Fastmail account. I get some amount of space (I forgot just how much) with my paid account, and I figure it's going to be CDN'd or whatever for my use-case enough that I don't have to worry about it. And while the web-upload is not as easy as Imgur or the like, it's functional.

    Of course, if you don't have a Fastmail account, this doesn't apply. But other email hosts might have an option like it too, if they allow you to host arbitrary files.

    4 votes
  8. [2]
    pew
    Link
    I think it heavily depends on your use-case. Just sharing images with a few friends? I wouldn't worry and set up an instagram-like tool, I would just use something like Dropbox/Google Drive and...

    I think it heavily depends on your use-case. Just sharing images with a few friends? I wouldn't worry and set up an instagram-like tool, I would just use something like Dropbox/Google Drive and share a link. You can also decide how long it'll stay online then. With Google Photos you can also share links to images or an album and they'll remove the location data on the fly.

    If it's for a blog, website or an online image gallery you want to share with the world, I'd look into tools like Pixelfed if you want to self-host these things. I guess there are also gallery-like apps for self-hosted solutions like Nextcloud and Owncloud.

    3 votes
    1. StellarTabi
      Link Parent
      Don't use Google Photos for sharing beyond personal friends, it does spooky unexpected redirects to Google Service(s) Apps on mobile (when the user is just expecting a .jpg or w/e), and is...

      Don't use Google Photos for sharing beyond personal friends, it does spooky unexpected redirects to Google Service(s) Apps on mobile (when the user is just expecting a .jpg or w/e), and is probably a doxing liability.

      4 votes
  9. Grzmot
    Link
    I can recommend cubeupload: https://cubeupload.com/ They're pretty cool.

    I can recommend cubeupload: https://cubeupload.com/

    They're pretty cool.

    3 votes
  10. jgb
    Link
    To be honest one of the easiest approaches would probably be to create a burner Reddit account and post images to the userpage. https://i.redd.it is fast, rarely goes down, and is likely to be...

    To be honest one of the easiest approaches would probably be to create a burner Reddit account and post images to the userpage. https://i.redd.it is fast, rarely goes down, and is likely to be around for years to come.

    3 votes
  11. Eric_the_Cerise
    Link
    I don't think anyone mentioned it yet ... I run a Nextcloud server, which is a lot like a self-hosted version of Dropbox or Google Drive, with many (many!) optional add-ons. It might be overkill...

    I don't think anyone mentioned it yet ... I run a Nextcloud server, which is a lot like a self-hosted version of Dropbox or Google Drive, with many (many!) optional add-ons.

    It might be overkill just for photos, but it does include many options for sharing photos, with very granular control over who can see them, whether they can download them, and for how long.

    You can self-host your own copy, or just sign up for an account.

    3 votes
  12. asoftbird
    Link
    I've been using imgur for a while and while it allows you to create albums, nowadays it no longer allows you to directly link to them (unless you use the "share embed" thing which is a PITA to...

    I've been using imgur for a while and while it allows you to create albums, nowadays it no longer allows you to directly link to them (unless you use the "share embed" thing which is a PITA to use) + the little scroll menu for the albums is a pain to use as well. It was decent a few years ago, but it's a pile of shit now.

    Regarding put.re: I've tried using this, but some websites apparently block that domain + uploading images takes ridiculously long for some reason. Doesn't seem to work wel.

    2 votes
  13. StellarTabi
    Link
    I don't know any existing solutions, but if you wanted to write one, (personal or as a SaaS company) B2 has the best prices (compare to AWS S3), cloudflare's ToS says you can't exclusively be an...

    I don't know any existing solutions, but if you wanted to write one, (personal or as a SaaS company) B2 has the best prices (compare to AWS S3), cloudflare's ToS says you can't exclusively be an image host, and nginx would probably be a great cache to use plus also has an addon module to "transform" images on the fly so you don't need to always persist thumbnails to disk.

    2 votes
  14. freddy
    Link
    Currently waiting for snap.as to become a thing.

    Currently waiting for snap.as to become a thing.

    2 votes
  15. StellarTabi
    Link
    I think webp will soon be the best option (safari is the last hold out, but support is in beta now). PNG is currently king I think, use optipng:...

    Can anyone recommend software for optimizing image sizes? (Linux friendly, command-line or otherwise scriptable utilities preferred.)

    I think webp will soon be the best option (safari is the last hold out, but support is in beta now).

    PNG is currently king I think, use optipng: https://www.cyberciti.biz/faq/linux-unix-optimize-lossless-png-images-with-optipng-command/

    2 votes
  16. ssgjrie
    Link
    For hosting, it depends a lot on how much control you want to have, privacy, free vs paid, etc. The solution that gives you more control is to get a domain and hosting (can be a traditional...

    For hosting, it depends a lot on how much control you want to have, privacy, free vs paid, etc.

    The solution that gives you more control is to get a domain and hosting (can be a traditional hosting plan or something like S3, Backblaze B2, Wasabi, etc). There are costs (monthly or yearly for hosting, yearly for the domain), depending on the content you're sharing you may have legal issues and you need to handle/pay for traffic spikes (eg: if someone shares your URL). Only you use that domain, so it will be associated with you.

    Solutions like Dropbox, Google Drive, etc, usually don't have hot-linking and limit access to popular content. They may also remote public content, depending on what it is.

    Free image hosting... they either become crap or close. It's hard to make money (and it's not cheap for popular services), so it's not surprising to see imgur going this path.

    One other alternative is to create a blog on a platform like wordpress(.)com. You don't control the domain, but there's no need to worry about costs and bandwidth. 3GB for free for each account and you can use direct links.

    2 votes
  17. guy
    Link
    You can use a GitHub repo + a web-based image upload tool for hosting your images, and you can even use your own domain. Here's a walkthrough: https://fizzy.cc/use-github-repo-to-host-images/

    You can use a GitHub repo + a web-based image upload tool for hosting your images, and you can even use your own domain.

    Here's a walkthrough:

    https://fizzy.cc/use-github-repo-to-host-images/

    1 vote
  18. crdpa
    Link
    Oh, just remenbered there is http://0x0.st/ It will remove your file if there is not enough access after a period of time and it will remove after a year.

    Oh, just remenbered there is http://0x0.st/

    It will remove your file if there is not enough access after a period of time and it will remove after a year.

    1 vote