KS: correct image handling