5 ms·
Ask HN: Where do you store images for your static site?
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?
- OhMeadhbh 2y agoas data uris. the whole static site is on one of a couple different CDNs depending on region.
- ritagreg 2y ago[flagged]
- cuu508 2y agoTogether with the static site, in /img/ directory next to the html files.
- h2odragon 2y agoi've always used /art/
- pestatije 2y agoim using Cloudflare for my static content (includes images)
- jskherman 2y agoI 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/ https://developers.cloudflare.com/pages/platform/limits/
- sgbeal 2y ago> 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.
- jskherman 2y agoFrom 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.
- sgbeal 2y ago> From what I read and experienced, it makes the size of the Git repository much bigger than it should be... Of course, it's a trade-off, but how is that particular one more painful than being at the whims of (and paying for) a third-party provider for something as mundane as static image files?