Images with metatag and orientation

In the Back End of a site I have a procedure for inserting / updating records with a file field for inserting or updating an image in horizontal format.
In the case of a vertical development image, the code still saves the image horizontally by adding a background color to the sides of the image
So far, so good
However, sometimes vertical images from smartphones or tablets probably contain metatags on the orientation of the device at the time of shooting, with the result that the image is inserted rotated by 90 degrees
Is there a method in Wappler to remove these meta tags before the image saving procedure?
Thank you all and Merry Christmas

Hi.
You can try this cool extension which can read EXIF data on images.

You can modify the extension to clear remove EXIF data as well, I think. The npm library being used supports that from what I remember.

Use the Auto Orient option of the Load Image step:

The auto orient option is useful when you are uploading photos taken with phones in portrait mode. If the option is not turned on, the images will appear rotated when uploaded.
So, turning auto orient option on, will ensure the image will appear as it’s taken and won’t appear rotated.

1 Like

Ah yes. Forgot about this option. This should work well for your use case @Marzio.

Thanks for your answers
Teodor, I set the “auto orient” option and it works.
However, I don’t remember why I had deactivated it some time ago, again due to a problem of incorrect orientation of the images.
Also because the customer inserts photos taken by different agents using different devices, with different settings
But perhaps with the Wappler updates it may be that now there are no problems.
We will see. If they report new problems I will let you know

Happy 2023 to all of you

1 Like