I’ve dabbled with static site generators, and would like to replace my Wordpress blog, but I have some questions and site requirements:
-
It’ll be a photography related blog site with lots and lots of photos. Where should I store them? In the directory with the post or elsewhere? Where?
-
I would like the images to lazy load.
-
Ideally o would like a gallery feature, but not required.
-
Would you build locally and then upload or use another method like GitHub to netlify (can’t store 5GB of photos on GitHub)?
-
Where would you host it?
-
Is there any way to have the site automatically with minimal coding serve alternate image formats like webp?
Thanks!
You can absolutely do all of the above with a SSG. But unlike say Wordpress where you can get a lot of these features by installing a plugin, most you’ll need to develop yourself, at least in Jekyll-land.
-
Depends on your needs and you’re only looking for cheap or “free” solutions. Services like Cloudinary might be the way to go as they can host your images, provide them in various sizes via an API, multiple formats, and a bunch other neat things.
-
Will depend on how you’re referencing images in your content. If you have control over the markup via a layout or _include
partial then you can use a JavaScript library like lazysizes. Or you could go JavaScript free and add the relatively new loading="lazy"
attribute to your images which latest browsers support.
-
Doable. You can use Jekyll plugins or write your own _include
helper that can loop through images defined in YAML front matter.
-
Will depend on the size of your site and how long it takes to build. Netlify caps out at 20minutes. Travis CI and other CI/CD services have varying build time limits. You may have to build locally then use something like rsync to push to server. I used to do this with Gulp tasks before moving to Netlify.
-
Depends on your needs and what you can get away with services that offer generous free tiers.
-
Will depend on the SSR you go with. For Jekyll not sure of any webp plugins, but you can use a task runner like Gulp to convert all your images for you.
For inspiration, this site has a lot of photography and nicely put together galleries. I believe he’s still using Jekyll to build it all.
1 Like