I occasionally make a video from slide images. I find I get the best quality and compression by putting the images in the timeline in your preferred video editor (I use Vegas Pro 13), saving as a motion jpeg*, then use ffmpeg to convert that to H264. I use
-crf 28, which is probably called "constant quality" in Handbrake. At 1024x768 resolution I easily get bitrates under 100 kbps and they look great. You can increase the crf value to get more compression or decrease it to get better quality, so you can fine tune to your tastes.
With this method above, I would bet H264 and VP8 are comparable. VP9 will probably be better, but it doesn't work on everything and takes a lot longer to encode.
My theory why this works:
Motion jpeg is intra-frame compression only. Each individual frame is compressed as an image, then added to the stream; there is no inter-frame compression (compression between frames). It doesn't have I-frames or any of that complicated stuff. So for a full second in your video all the frames are identical, not just "look the same". They are technically identical.
H264 then has a lot of power to compress the motion jpeg. It sees a string of identical frames then does the equivalent of saving the first frame completely then uses nearly dataless "reference frames" for the rest.
*Motion jpeg will be a relatively big file. Coincidentally, when I record a slides presentation, I initially encode as motion jpeg because most of the presentation will be static slides.