KS: add some image handling