question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

auto-orient images and thumbnails when uploaded to firebase storage

See original GitHub issue

[REQUIRED] Step 2: Extension name

This feature request is for extension: storage-resize-images

What feature would you like to see?

I have a public script which reads the EXIF data from jpeg images

As you are probably aware of… iPhone photos which are taken on portrait mode would appear sideways if you show the resulting thumbnail or uploaded image to the user inside an image tag even after your plugin completes generating the thumbnails.

I was successfully able to set a sample script to auto-orient the jpeg images by preselecting EXIF orientation image which value is read as: 6 (six)

I do NOT want to mess with the code you offer as prebuilt plugins… So I am kindly asking to include it as soon as possible.

If you need additional data please let me know.

Stay safe

How would you use it?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
jakob-ecommented, Apr 30, 2020

Sharp has auto-rotate out of the box https://sharp.pixelplumbing.com/api-operation

return sharp(originalFile)
  .rotate()
  .resize(parseInt(width, 10), parseInt(height, 10), { fit: "inside" })
  .toFile(resizedFile);
2reactions
russellwheatleycommented, May 1, 2020

@EliasTouil If you only care about the image being correctly oriented in Firebase Storage via this extension, then I guess you don’t need to create another issue. But if you would like the images metadata being carried over to the resized image(s) then you could create a new issue for a feature request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

use -auto-orient with imagemagick in Firebase functions
upload (tempFilePath, { destination: thumbFilePath }); }) ... But when I deploy this to firebase and I try to upload an image I...
Read more >
Uploading Images to Firebase Storage (and retrieving them)
Firebase is a platform that contains many useful features including the Firestore database which we've used in the past.
Read more >
Image Being Uploaded To Firebase Storage In Wrong ...
Deploying your Web Resize Image and Create a Thumbnail on Upload Enable the Auto Orient option if you are planning to upload photos...
Read more >
Resize Image and Create a Thumbnail on Upload
Now we are going to extend the upload action with an image resize and crop ... Enable the Auto Orient option, if you...
Read more >
Is there a way to generate thumbnails for images already in a ...
I have a couple of GBs of images in a bucket and what to generate the thumbnail ... How do I use Firebase...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found