Live data from Hacker News

Ask HN: Where do you store images for your static site?

news.ycombinator.com

1–10 of 12 posts

Ask HN: Where do you store images for your static site?

#1
I'm currently using Zola as my static site generator and I'm looking into ways to store and serve images from. There are options like Cloudflare's R2 (S3-compatible), Cloudinary, or even a site dedicated to images and hotlinking to there. God forbid that the solution is committing binary images to the Git repository.

Do you have any recommendations that are portable (e.g. easy to switch vendors) and inexpensive, preferably free at the start?

Re: Ask HN: Where do you store images for your static site?

#7

im using Cloudflare for my static content (includes images)

I see. I considered doing a static site dedicated to images on Cloudflare Pages and hotlinking from there. According to the docs[1], Cloudflare Pages projects support up to 20000 files.

[1]: https://developers.cloudflare.com/pages/platform/limits/

Re: Ask HN: Where do you store images for your static site?

#9
post #8

> God forbid that the solution is committing binary images to the Git repository. Where does the misconception that that's somehow a problem stem from? In 30 years of having web sites, that approach has invariably served me well.

From what I read and experienced, it makes the size of the Git repository much bigger than it should be with how Git tries to keep copies of old binary files (specifically the data and hash) since it cannot diff those unlike plaintext. You eventually have cache of the old files in the repo if you're not deliberate with setting --depth when cloning.

Re: Ask HN: Where do you store images for your static site?

#10

as data uris. the whole static site is on one of a couple different CDNs depending on region.

Like encoded base64 and using a post-processor to convert the images?

yup. also, i've started denoising and converting images to avifs. amazeballs compression. sometimes denoising introduces artifacts in the "whatever" to AVIF conversion, so ymmv.
Post reply on HN