immich
immich copied to clipboard
feat(web): rotate image
Image rotation
Description
This PR adds the rotation feature by saving/updating the Orientation exif tag to a sidecar file. Afterwards, it queues jobs to regenerate thumbnails, which now use the saved orientation value. The only thing left to do is change the url so it can bypass the frontend cache which currently relies on asset.checksum, which isn't updated with this type of edit.
API Changes
PUT /api/assets { assetIds: [], orientation: <1,2,3,4,5,6,7,8> }
PUT /api/assets/:id { orientation: <1,2,3,4,5,6,7,8> }
Fixes #8355 (and potentially double rotates other HEIF images, which can at least now be fixed in the web ui directly)
Wouldn't it be better to set the orientation tag in the preview and thumbnail instead of regenerating them?
I can see if it is possible to update them by simply changing exif. I was under the impression that it wouldn't change how it displayed it.
Deploying preview environment to https://pr-16089.preview.internal.immich.cloud/
@mertalev you combined all the jobs together, but thumbhash still needs to be regenerated when orientation changes. I can't be bothered to rewrite this just to prevent regenerating 2 thumbnails.
When’s the expected release date for this feature?
@mertalev wrote:
-
HEIF needs to be handled correctly before this can be merged
-
Can you debounce the rotation clicks?
@jrasm91 wrote:
I can't be bothered to rewrite this just to prevent regenerating 2 thumbnails.
@jrasm91 : Where are you on this? Have you given up on this PR? (Which would be fair enough. This is open source and voluntary after all...)
It seems like very worthy functionality, but it sounds like it needs the finishing touches. Would anybody be able to provide any hints on how to complete this?
We're starting to pick this up internally again.