title: Sharp image library rotates image when resizing?
body: <p>When using the sharp image resize library <a href="https://github.com/lovell/sharp" rel="noreferrer">https://github.com/lovell/sharp</a> for node.js, the image is being rotated.  </p>
  
  <p>I have no code thats says .rotate(), so why is it being rotated and how can I stop it from rotating?</p>
  
  <p>I'm using the serverless-image-resizing example provided by AWS:  <a href="https://github.com/awslabs/serverless-image-resizing" rel="noreferrer">https://github.com/awslabs/serverless-image-resizing</a> that uses lambda to resize images on the fly if the thumbnail does not exist</p>
  
  <pre><code>S3.getObject({Bucket: BUCKET, Key: originalKey}).promise()
  .then(data =&gt; Sharp(data.Body)
        .resize(width, height)
        .toFormat('png')
        .toBuffer()
      )
  .then(buffer =&gt; S3.putObject({
          Body: buffer,
          Bucket: BUCKET,
          ContentType: 'image/png',
          Key: key,
        }).promise()
      )
  .then(() =&gt; callback(null, {
          statusCode: '301',
          headers: {'location': `${URL}/${key}`},
          body: '',
        })
      )
  .catch(err =&gt; callback(err))
  </code></pre>
  
  <p>Original large image:</p>
  
  <p><a href="https://i.stack.imgur.com/hx76o.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/hx76o.jpg" alt="enter image description here"></a> </p>
  
  <p>Resized image: note it has been rotated as well:</p>
  
  <p><a href="https://i.stack.imgur.com/fjq7J.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fjq7J.png" alt="enter image description here"></a></p>