this bit of code in pictureservice getimageurl -
switch (lastPart)
{
case "pjpeg":
lastPart = "jpg";
break;
case "x-png":
lastPart = "png";
break;
case "x-icon":
lastPart = "ico";
break;
}
will put a .jpg on the end of some images, but if the mime type is jpeg (instad of pjpeg), it will have an extension of .jpeg. This leads to having inconsistent file extensions across jpeg image, some have .jpg and some .jpeg. My store seems to have a mix of both throughout it