I have a simple test jekyll app like so:
index.html is:
For images, I made a drop-in plugin that runs the images through image_optim:
https://gist.github.com/sffc/a828267913591159ab1cc3e1bfde20d7