title: Images are being rotated by default upon upload
body: <p>I am trying to take a photo and upload the same into my application using Samsung S7. But the image is being rotated upon upload. Even if I am selecting the image from gallery also, it is being rotated upon upload. Is there anything that we can fix from jquery code. Please suggest. Thanks in advance</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div class="photo-div" id="photo"&gt;
                  &lt;img id="uploadimage" src="" hidden=""&gt;
              &lt;/div&gt;
  
  &lt;label id="files-label" for="files" class=" myprofile-btn-bold"&gt;Replace Image&lt;/label&gt;
  &lt;input id="files" style="display:none;" type="file" accept="image/*" onchange="readURL(this);"&gt;
  </code></pre>
  
  <p><strong>Jquery:</strong></p>
  
  <pre><code>function readURL(input) {
  
      if (input.files &amp;&amp; input.files[0]) {
          var reader = new FileReader();
  
          reader.onload = function (e) {
              $('#files-label').html('Replace Image');
              $('.photo-image').removeClass('photo-image');
              $('#uploadimage').attr('src', e.target.result);
              $("#headshot-message").hide();
              $("#headshot-cancel").hide();
              $('#noimage-label').addClass('hidden');
          }
  
          reader.readAsDataURL(input.files[0]);
      }
  }
  </code></pre>