move logic to image ince image is returned

Signed-off-by: nox <nox@nox-N76VZ.(none)>