Check image type

This is bit of an odd one, but is there any way to check the extension of an image from an imgur gallery link such as http://imgur.com/gallery/96xohn8 ? I feel like this is a stupid question but I thought itโ€™d be at least worth asking :stuck_out_tongue:
Thanks for any help in advance :slight_smile:

Parse the HTML, and read the src attribute of the img tag where the image you want is. Then simply do a pattern to get the extension (someone posted code to do this very recently, but itโ€™s as simple as getting the characters from the end up to the first dot).

[editline]8th May 2015[/editline]

http://web.archive.org/web/20040703165638/http://www.passtheaardvark.com/lua/LuaXML-0.0.0.tgz this seems to have what you need (one is pure lua, one is C, ignore the C one)