I was having troubles loading an image via php script. ex.
http://www.example.com/images.php?file=imagename&blah=blah
when the image would load you would see a "code" representation of the
image.
by adding php to this line
imgRegExp = /\.(jpg|gif|png|bmp|jpeg(.*)?$/i
so it would look like this
imgRegExp = /\.(jpg|gif|png|bmp|jpeg|php)(.*)?$/i
the images displayed correctly.