Live data from Hacker News

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

news.ycombinator.com

1–10 of 66 posts

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

#1
I am curious what are the current best practices and offerings for hosting images (or short videos, gifs, etc.) for small to mid scale websites?

Currently, I am using Cloudinary but the management interface leaves a lot to be desired. I have seen some static sites use GitHub repositories for hosting images which I think is a pretty cool hack.

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

#6
post #2

When it comes to GitHub repo, what does the URL of the image look like? Is some kind of hash added to the filename? At the moment I use media files from my WordPress blog to store images.

I just add them to an img folder in my Github repository and it is then served as part of the Github page. Just using `src=img/picture.jpg` works fine.

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

#8
The image is placed in my website directory and then my static site generator, jekyll, uses a relative path tag to generate the path for the final compiled website on my machine. This static website is then uploaded to github. If I was uploading elsewhere, the workflow would be the same. Only the relative path is hardcoded and the domain therefore doesn’t matter. The true filepath is to some github link in my “_site” directory, but neither I nor the user see it. Static sites are very easy to manage in this way.

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

#10
Just curious, what do you use for hosting the blog or landing page itself?

For example, we use GitHub Pages for hosting the landing page. So for hosting images, we use GitHub itself and it mostly works.

For the blog, we currently use Substack, but thinking of maybe moving it to GitHub Pages too.

FYI, here is our repo: https://github.com/dstackai/dstack

Post reply on HN