Live data from Hacker News

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

news.ycombinator.com

11–20 of 66 posts

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

#12

I guess I'm behind the times, but I just store them on the file system where I am serving the website from.

This is what I’ve done - if you want to be a bit more protective you can do some things to make sure they’re not hotlinked from elsewhere, but that’s up to you.

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

#13
If you aren't getting hundreds of requests per second, and the resources aren't huge, there's really no reason why you can't host them yourself. Especially with webp, the bandwidth is negligible.

If you're really worried, cloudflare can help with caching. FWIW, this is served off domestic broadband with cloudflare caching: https://search.marginalia.nu/explore/random It's survived the HN front-page, despite being a bit of a pathological case since the images are random out of a pool of tens of thousands. Images are also larger than they appear visually. Native res is like this: https://search.marginalia.nu/screenshot/187889

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

#14
That depends.

Some files are files that are part of the web site. They are put there by the developer(s) of the web site. Things like maybe the logo image in the header, or that cool rotating flaming skull in the footer. These files just go on the file system of the web server.

Some files are user uploads. A person writing a blog post wants to upload some images to be inserted into that blog post. For these sorts of files I just use whatever object storage system makes the most sense given the circumstances S3, GCS, etc.

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

#18
post #12

I guess I'm behind the times, but I just store them on the file system where I am serving the website from.

This is what I’ve done - if you want to be a bit more protective you can do some things to make sure they’re not hotlinked from elsewhere, but that’s up to you.

Me too.

I took it one step further: I don't have an image-heavy site, so I degrade the resolution to make images as small as possible, then embed them in the HTML as base64 strings. Very portable!

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

#20

I guess I'm behind the times, but I just store them on the file system where I am serving the website from.

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?

Post reply on HN