Unable to Upload Image with Valid File Extension

Problem


Unable to upload .JPG files when Attachment Setting Filter only allows .JPG files.

Attachment Setting

Attach File in Issue

File Extension

Solution


Use a file third-party online converter

Root Cause


When you change a file extension within the Window Explorer file browser/Finder Window, it does not change the file's type but causes the computer to misidentify the file into performing how software programs would open such file type.

How to Check File's MIME Type


  1. Open Terminal/Command Prompt, and navigate to the file's directory
  2. Key in the following command in the command line: file --mime-type -b filename
Result:
Akeles-MacBook-Pro:~ akeles$ file --mime-type -b AttachmentChecker_Logo_144x144.jpg
image/png
Akeles-MacBook-Pro:~ akeles$ file --mime-type -b AkelesBlockLogo.jpg
image/jpeg

Although AttachmentChecker_Logo_144x144.jpg has a file extension .JPG, it's MIME type is image/png. Where as AkelesBlockLogo.jpg has a MIME type image/jpeg.