Live data from Hacker News

Ask HN: Where do you host images for your blog or landing pages?

news.ycombinator.com

51–60 of 66 posts

Re: Ask HN: Where do you host images for your blog or landing pages?

#51
Simple hack for one-off (or a few) images. Go to any Github repo and create a new Issue, drag and drop your image into the issue-box. Github uploads it to their server and adds a markdown link for the image, which has a perfectly usable *.githubusercontent.com url that you can pick and use anywhere.

I use this way more often than I should TBH. YMMV

Note: Only do this for images you have backed up elsewhere (heck, in git itself is fine). This is purely to prevent having to spend any $$$ on hosting/CDN whatever

Re: Ask HN: Where do you host images for your blog or landing pages?

#52

S3 has no minimum fee. For a small site they'll probably send you a 4 cent invoice each month. You can then throw cloudflare in front of the S3 box for free. Alternatively, as others have said, you can just plop them on the server and call it a day.

Let's see what the pricing calculator says. Assuming you stored 1GB of content, with 4MB images, and you transferred out 40GB of content each month:

  1 GB per month / 0.00390625 GB average item size = 256.00 unrounded number of objects
  1 GB x 0.0230000000 USD = 0.02 USD
  100,000 GET requests in a month x 0.0000004 USD per request = 0.04 USD (S3 Standard GET requests cost)
  40 GB x 0.0007 USD = 0.028 USD (S3 select returned cost)
  0.023 USD + 0.04 USD + 0.028 USD = 0.09 USD (Total S3 Standard Storage, data requests, S3 select cost)
  Internet: 40 GB x 0.09 USD per GB = 3.60 USD
  
  Total: $3.69
And for 1TB stored & transferred & 1M GETs each month:

  1,024 GB per month / 0.00390625 GB average item size = 262,144.00 unrounded number of objects
  1024 GB x 0.0230000000 USD = 23.55 USD
  1,000,000 GET requests in a month x 0.0000004 USD per request = 0.40 USD (S3 Standard GET requests cost)
  1,024 GB x 0.0007 USD = 0.7168 USD (S3 select returned cost)
  23.552 USD + 0.40 USD + 0.7168 USD = 24.67 USD (Total S3 Standard Storage, data requests, S3 select cost)
  262,144 number of objects x 0.000005 USD = 1.31072 USD (Cost for PUT, COPY, POST requests for initial data)
  Internet: 1024 GB x 0.09 USD per GB = 92.16 USD
  
  Total: $118.14
Assuming Cloudflare had a significant cache hit rate, you'd save a decent chunk of change.

Re: Ask HN: Where do you host images for your blog or landing pages?

#53
post #20

Earlier quoted context omitted.

If one is worried about scale, it's pretty easy to throw them behind a CDN like Cloudflare or Bunny.net. They'll cache the static file for you so that your web server isn't always delivering it. I used to upload assets for apps to S3 to be served from there when I just started thinking that my CDN is going to be taking the vast majority of hits for static files so why should I be adding a step to my deploy process?

99,99% of people are overestimating their blogging needs. Unless you're Scott Hanselman the cheapest Hetzner VPS will cover all their hosting needs. It's amazing that even many developers nowadays don't really understand how far just basic hosting will take you before you need edge, cdn, s3 or anything else.

Modern static hosting providers have generous free tiers, amazing UX, zero maintenance, and handle all the same if you have 1 or 1 million visitors (the only difference being your bill).

Re: Ask HN: Where do you host images for your blog or landing pages?

#55

GitHub Pages works for non-commercial purposes. You get 1GB to serve and max file size is 100MB. Soft bandwidth limit 100GB/month, with some rate limiting. Best to put CloudFlare in front (actually I can't get CloudFlare to work with Google Pages, their cache never expires so no new pages show up through CloudFlare) CloudFlare Pages ( https://pages.cloudflare.com/ ) has a free plan with 100 sites, unlimited requests,…

The first option is what I'm using. CloudFlare in front of GitHub Pages. It seems to work well, my blog gets literally dozens of visits a month and it's never gone down.

Re: Ask HN: Where do you host images for your blog or landing pages?

#56

You can go surprisingly far with a $5/mo Digital Ocean droplet and the Cloudflare free tier. Just host your website the boring way, put CF in front of it and they will cache and serve all of your static content for free.

Why not use CloudFlare Pages directly? It avoids you having to deal with and maintain a droplet, beings the $5/month to $0/month, reduces attack surface, makes scaling "magic", etc. The only caveat is that your site needs to be fully static, but it probably already is anyways.

Re: Ask HN: Where do you host images for your blog or landing pages?

#57
I do Amazon S3. Not because I have any particular love for Amazon, but because it was the default in the original template I used, and it was easy to set up and almost free. It has worked well. Most months I'm under the free tier usage limit, and the largest bill I've seen so far was less than $5.

My hosting provider (Render) requires an add-on for file storage, so last I checked AWS S3 free tier was the cheaper option.

Post reply on HN