Skip to content

Commit

Permalink
[Mime] Prefer .jpg instead of .jpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Oct 4, 2020
1 parent 8239e12 commit aa1d922
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MimeTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ public function guessMimeType(string $path): ?string
'image/ief' => ['ief'],
'image/jls' => ['jls'],
'image/jp2' => ['jp2', 'jpg2'],
'image/jpeg' => ['jpeg', 'jpg', 'jpe'],
'image/jpeg' => ['jpg', 'jpeg', 'jpe'],
'image/jpeg2000' => ['jp2', 'jpg2'],
'image/jpeg2000-image' => ['jp2', 'jpg2'],
'image/jph' => ['jph'],
Expand All @@ -1338,7 +1338,7 @@ public function guessMimeType(string $path): ?string
'image/openraster' => ['ora'],
'image/pdf' => ['pdf'],
'image/photoshop' => ['psd'],
'image/pjpeg' => ['jpeg', 'jpg', 'jpe'],
'image/pjpeg' => ['jpg', 'jpeg', 'jpe'],
'image/png' => ['png'],
'image/prs.btif' => ['btif'],
'image/prs.pti' => ['pti'],
Expand Down

2 comments on commit aa1d922

@jinrenjie
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why move jpg to index 0?

@simonschaufi
Copy link

@simonschaufi simonschaufi commented on aa1d922 Jan 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fabpot thank you for breaking my laravel mime type validation πŸ˜› This change should have been a breaking change! See https://laravel.com/docs/7.x/validation#rule-mimes

Please sign in to comment.