Page MenuHomePhabricator

JPEG is set as canonical extension for JPEG files, should be JPG instead
Open, Needs TriagePublic

Description

From MimeAnalyzer.php: "If multiple extensions for a single MIME type exist or if multiple MIME types exist for a single extension then in most cases MediaWiki assumes that the first extension following the MIME type is the canonical extension, and the first time a MIME type appears for a certain extension is considered the canonical MIME type."

image/jpeg jpeg jpg jpe

The canonical extension is ".jpg" so that line should read:

image/jpeg jpg jpeg jpe

Edit: clarified

Event Timeline

Restricted Application added a project: Commons. · View Herald TranscriptMar 12 2020, 11:52 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
4nn1l2 added a subscriber: 4nn1l2.Mar 12 2020, 11:55 AM
Aklapper changed the task status from Open to Stalled.Mar 12 2020, 3:16 PM

JPEG is not the canonical extension for JPEG files

But...?

Please read and follow https://www.mediawiki.org/wiki/How_to_report_a_bug - it covers how to provide steps to reproduce, asks to explain what you expect, and asks to explain what happens instead. Thanks.

AlexisJazz added a comment.EditedMar 12 2020, 3:22 PM

JPEG is not the canonical extension for JPEG files

But...?

Please read and follow https://www.mediawiki.org/wiki/How_to_report_a_bug - it covers how to provide steps to reproduce, asks to explain what you expect, and asks to explain what happens instead. Thanks.

Change

image/jpeg jpeg jpg jpe

to

image/jpeg jpg jpeg jpe

Also, the sky is blue.

Sigh.. going through the motions

Expected:

  1. Try to upload some file with "image/jpeg" mimetype but don't enter any extension
  2. MediaWiki sets the extension to .jpg
  3. God guides a lost puppy back home

what happens instead:

  1. Try to upload some file with "image/jpeg" mimetype but don't enter any extension
  2. MediaWiki sets the extension to .jpeg
  3. God kills a kitten

Nothing personal but this just feels so bureaucratic. Wasn't it obvious? Doesn't everybody here worth their salt know that jpg is the canonical extension for JPEG files?

Aklapper added a comment.EditedMar 12 2020, 3:54 PM

Change

image/jpeg jpeg jpg jpe

to

image/jpeg jpg jpeg jpe

Thanks, that's clearer now.

Also, the sky is blue.

@AlexisJazz: Also, https://www.mediawiki.org/wiki/Bug_management/Phabricator_etiquette . Thanks.

Nothing personal but this just feels so bureaucratic.

That can be avoided by creating less ambiguous bug reports.

Wasn't it obvious? Doesn't everybody here worth their salt know that jpg is the canonical extension for JPEG files?

No, obviously the education that I received was quite limited (or maybe there are other ways to interpret sentences like "Doesn't everybody know..."?). :)

"JPEG is not the canonical extension for JPEG files" can both mean that JPEG is currently set as canonical extension in MediaWiki but should not, or that JPEG should be the canonical extension but that it currently is not in MediaWiki. Welcome to human languages.
Beforehand, you did not mention anywhere if you think that jpeg or jpg is the "canonical extension".
And I still don't have the slightest idea what makes you think that "jpeg" "jpg" is "canonical" (though you might very much be correct). Shrug.

Aklapper renamed this task from JPEG is not the canonical extension for JPEG files to JPEG is set as canonical extension for JPEG files, should be JPG instead.Mar 12 2020, 3:55 PM
Aklapper changed the task status from Stalled to Open.
AlexisJazz updated the task description. (Show Details)Mar 12 2020, 5:45 PM
AlexisJazz updated the task description. (Show Details)

And I still don't have the slightest idea what makes you think that "jpeg" "jpg" is "canonical" (though you might very much be correct). Shrug.

As of March 2020, 51906319 files on Commons had the "jpg" extension (98.5%), 787925 files had the "jpeg" extension. (1.50%)

Note that these numbers include redirects and are not case-sensitive (so .JPG counts as .jpg etc). Also, every camera I've ever owned produced .jpg (or .JPG) files, not .jpeg. Further, I can't think of a single major website that uses .jpeg.