A couple of ideas for this. Simple version: compare the entered text against a regexp for images (some ideas at [StackOverflow)](http://stackoverflow.com/questions/169625/regex-to-check-if-valid-url-that-ends-in-jpg-png-or-gif)). Complicated version: retrieve the header, check for `Content-type: image` or other suitable values.