I read on the reference that from iOS version 4.+ with the method imageNamed of UIImage object, the file extension is not required.
From
If you have these images bundled in your app, you SHOULD know their extensions.
If you're getting them from an online source and you have them as NSData, you can use this code here to determine the type.
+ (NSString *)contentTypeForImageData:(NSData *)data {
uint8_t c;
[data getBytes:&c length:1];
switch (c) {
case 0xFF:
return @"image/jpeg";
case 0x89:
return @"image/png";
case 0x47:
return @"image/gif";
case 0x49:
case 0x4D:
return @"image/tiff";
}
return nil;
}
As per the top answer in this question.