[Olena-patches] milena r1220: Refactoring of image_if