title: Why the various JPEG Extensions?
body: <p>While working on a downloader, I've encountered the following with Python's <code>mimetypes.guess_extension</code> function:</p>
  
  <pre><code>In [2]: mimetypes.guess_extension('image/jpeg', strict=False)
  Out[2]: '.jpe'
  </code></pre>
  
  <p>I knew that <em>jpeg</em> and <em>jpg</em> are valid JPEG extensions, but I didn't know about <em>jpe</em>. So looking at the wikipedia site did reveal the following:</p>
  
  <blockquote>
    <p>The most common filename extensions for files employing JPEG compression are .jpg and .jpeg, though .jpe, .jfif and .jif are also used</p>
  </blockquote>
  
  <p>Even more extensions I didn't know of.</p>
  
  <p>So the main question: Why does JPEG have so many (valid) extensions associated with it?</p>
  
  <p>On a related note I'd like to know why Python does return 'jpe' and not 'jpg' or 'jpeg' since I see these used the most.</p>