moved image out of if/else autopep8ed