4 ms·
I used a combination of Hugo, Python script and a separate Netlify site to serve ~1k images. The python script cropped, resized and optimized images. Hugo gen
by dhruvkar 8y ago
I used a combination of Hugo, Python script and a separate Netlify site to serve ~1k images.
The python script cropped, resized and optimized images.
Hugo generated a simple image site with an API-like url schema that could be consumed by my main, also Hugo, site using the getJSON function.
Do the images change frequently, or is the situation more one and done?
- seanwilson 8y agoThanks! Interesting...why did you separate the images from the main site like this? What was the site for? Also, doesn't Netlify change your image URL names each deploy for cache busting reasons? Doesn't this cause problems? > Do the images change frequently, or is the situation more one and done? I'm thinking of something like a standard WordPress blog site with lots of images so infrequent changes.
- dhruvkar 8y ago>>why did you separate the images from the main site I anticipated using the images in more than one place at the time, so wanted an API-like interface. >>Netlify change your image URL names each deploy I have not run into this. My images don't change much either, so not redeploying very much, but have had no issues with URLS changing on me.
- seanwilson 8y agoHmm, what I should have said is I think Netlify modify image filenames to do cache busting on deploy so I'm guessing old image filenames eventually get discarded. As long as you're only relying on fairly recent image filenames from your API it shouldn't be an issue.