Note that I'm not actively maintaining these with everything on my plate right now, but I put together two different Hugo starters, both of which have image optimization built in (not my building, obviously, but using the awesome Gulp ecosystem):
I think @budparr is right in that the topic is a big one. If nothing else, the basis of the previously mentioned projects might provide some insight into the various techniques. Bud's pointer are always good, since he is the one who taught me about a lot of this stuff when I built my first static site a few years ago.
This is going to sound like a commercial plug, but if you sign up for netlify, you can do all this with a single click, and it's up to you to prioritize your time for dev vs. content creation (I seem to recall you and I chatting a few months back and if my memory serves, you write quite a bit). Post-processing, however, is not part of their free tier, but if you open source this project, your hair will really be blown back by how easy they'll make all of this for you. REsponding to your other threads shortly