When light fall on an opaque object, it forms shadow. The length of shadow depends the angle of incident of the light rays
But image forms due to the reflection of light. When light falls on an object, it reflect some light and that reflected light comes to our eyes , due to which we are able to see the image of object.
Rest the phenomena of formation of image can be explained through ray diagram.
hope this much detail will help you.