title: Why is Laravel renaming the file extension of the image that I upload?
body: <p>I uploaded a "jpg" file, then when it is being uploaded into my server it is changed as "jpeg"? How can I prevent Laravel from doing that?</p>
  
  <p>This is my code:</p>
  
  <pre><code>$path = Storage::putFile('public/category', $request-&gt;file('image'));
  $public_url = URL::to("/storage/category/".$request-&gt;image-&gt;hashName());
  $category-&gt;picture_url = $public_url;
  </code></pre>
  
  <p>Here it is when I upload it:
  <a href="https://i.stack.imgur.com/XrNyM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XrNyM.png" alt="enter image description here"></a></p>
  
  <p>When uploaded in the server:</p>
  
  <p><a href="https://i.stack.imgur.com/0tNEG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0tNEG.png" alt="enter image description here"></a></p>
  
  <p>Thanks.</p>
  
  <p>Edit: I think the guys here don't understand what I meant about this question that's why they think someone answered this question already. So, I'm okay with Laravel changing the file name because it makes it safe to avoid duplicate file names. What I don't want for Laravel to do is change its file extension from JPG to JPEG.</p>