indiainvestments / indiainvestments.github.io

India Investments community website.
https://indiainvestments.github.io
Apache License 2.0
34 stars 8 forks source link

Investigate a long term solution for media hosting #21

Open crimelabs786 opened 3 years ago

crimelabs786 commented 3 years ago

We need our Image / Video / GIFs to be available when hosted on the cloud.

Ideally, we'd keep the images in our GitHub repo as well.

Requirements

Card link: https://github.com/indiainvestments/indiainvestments.github.io/projects/5#card-54533677

rajatdhoot123 commented 3 years ago

Mostly it was hosted on Amazon S3 with CloudFront but it was not free but cheap are we strictly looking for free alternatives...?

takeda-discord commented 3 years ago

So I've looked for some options and here's what we have.

  1. simply upload images on GitHub. The recommended size limit is 1GB and "strongly" recommending limit is 5GB. It should be fine for our needs, at least for now.
  2. use Git LFS to save storage space but resort to using workarounds which may stop working without notice
  3. use somewhat well established sites like put.re and postimages.org. They have file retention options for an unlimited amount of time.
  4. use pixelfed by creating an account on pixelfed.social. Pixelfed is based on the new ActivityPub protocol like Mastodon is. We can self host it if we want.
  5. use archive.org for storing images. The links will be something like this.
  6. use somewhat exotic technology like IPFS. CloudFlare operates a functional proxy for it on https://cloudflare-ipfs.com. This has the advantage of the content being peer to peer and resistant to censorship. Try uploading images here. The hash can be used to retrieve images from https://ipfs.io/ipfs/ or https://cloudflare-ipfs.com/ipfs/.

1st option is the most simple and easy to get along with. I also doubt we'd run into 1GB limit anytime soon.

2nd might be better if we are concerned about storage or want to avoid hitting storage limit in the future. Git LFS has a separate 2GB space in addition to the 1GB limit IINM.

3rd and 4th options have obvious flaws. It'll work fine until, one day, it won't. put.re also doesn't let us control our content.

5th option is also feasible and doesn't seem to have any storage limits but we'd lose the advantages of putting files in git and git's decentralized nature. Who'll control the account where images are stored? What if he goes AWOL? Archive.org is also somewhat slow in India.

6th option is obviously not very attractive although it does offer the advantage of potentially censorship resistant hosting. I don't think it's worth the effort though.

We should decide between options 1, 2, and 5.

crimelabs786 commented 3 years ago

Mostly it was hosted on Amazon S3 with CloudFront but it was not free but cheap are we strictly looking for free alternatives...?

@rajatdhoot123 yes. Hosting it on Amazon S3 would be simplest, even a CDN like Cloudfront might not be needed. But that'd require registering credit card, and for obvious reasons, we're not yet at that stage. We'd like to exhaust free options first.

crimelabs786 commented 3 years ago

@onedotfour do check this out: https://uploadcare.com/

Also works with Netlify CMS

shaswatsaxena commented 3 years ago

The Firebase Spark plan is free, doesn't require CC. You get 5 GB storage with 1 GB/day download.

Also this repo for more free services that might be of use.

crimelabs786 commented 3 years ago

Hey @shaswatsaxena thanks for taking the time, to chime in.

Unfortunately, we're trying to avoid Google family of products at the moment. However, we'd probably consider it in the future

takeda-discord commented 3 years ago

@onedotfour do check this out: https://uploadcare.com/

The free plan has a limit of 100 uploads. image