When I call for an image I don't add .gif or .jpg to the end.

Example: <img src="http://www.site.com/image">

My old host was fine with this, and would display the image with no problems. The new host must have the extension on there in order for the image to load.

Can I add something to my PHP code, or in .htaccess to have it load the image trying one extension (like .jpg), and if it fails, try loading it with the other (.gif)?