added check for image in url.

Every image URL posted has to end with .jpg, .gif or .png