I’m scratching my head trying to figure out the way to setup and use the fingerprint feature for my website images. I’ve gone through the docs already looking for the answer and while it does mentions images and fingerprinting, it does so very briefly, only showing a real use case for stylesheets (much appreciate for that one!)
But how does it work for images that aren’t in the assets directory? I’ve got a bunch of images in “content/post/img”. Do all my images need to go inside the assets directory? Even those in the posts?
Currently, my images live inside the content/issue-X/ folder of every issue of my magazine. I COULD move my images to assets/issue-X/ but then I will have to also add that issue-x to the path of my image and that will break my template.
Question, because I might not have understood how this work correctly.
I went full fingerprint with my css files.
Instead of css/style.css now I have css/style.938toasdijgokadsn0a9w5.css
Every time I upload this to my CDN provider (cloudfront), do I need to also update all the html files linking to that .css? Because the fingerprint number will change each time, right? That means, the link will change too.
So, If I have 400 html files and 1 css file:
Change
from
h1 { color: black; }
to
h1 { color: red; }
Before
Upload style.css
Invalidate css/style.css
Drink grog
NOW
Upload style.csao8i9tu89a.css
Upload 400 html files scattered through 20 folders.
Cry
Drink grog.
Is that correct?
if it is, the only thing that I save is not having to invalidate one file, but have to pay for 400 file uploads. Not sure that’s the expected result…