Images now returning correctly.

Its a bit messy around the determining the mime types, also worried about case sensitivity which must be checked/accounted for.