I let users upload images to fileadmin when they're logged in in the frontend.
So far so good, this works.
Now some images (especially when uploaded form mobile phones) are rotated (if taken in landscape mode, for example).
I tried using Imagick to autorotate those images upon upload, but it seems at least the IPhone doesn't have proper EXIF-data in the image (images taken in HEIC-Format, seem to be converted to jpgs when uploaded and then lose all EXIF-Data). At least the getImageOrientation
-method from Imagick returns an invalid orientation.
Now, to overcome this, I've created a function for the users so they can rotate their images themselves. This works as well. The original image gets rotated as expected.
BUT: I need to update the processed images as well, since they still reflect the unrotated image.
How would I do that without manually deleting the processed-files in the installer?
I mean, I could create a new image and delete the old one, but that seems like some unnecessary labor.
Any ideas?