Added fail condition for images