Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Auto) update image EXIF thumbnail after manipulation #2613

Open
jumpalottahigh opened this issue Mar 9, 2021 · 0 comments
Open

(Auto) update image EXIF thumbnail after manipulation #2613

jumpalottahigh opened this issue Mar 9, 2021 · 0 comments

Comments

@jumpalottahigh
Copy link

What are you trying to achieve?
Update an image's EXIF thumbnail after manipulation (in this case image auto rotation based on EXIF orientation).

Have you searched for similar feature requests?
Yes, extensively. These are somewhat similar topics (but not quite):
#650
#189

What would you expect the API to look like?
Depending on how this is handled it could be either:

1) Sharp auto updates the image's EXIF thumbnail

2) On demand the user can update the EXIF thumbnail by:

const image = 'image.jpg'
const thumbnail = 'thumbnail.jpg' // file path, buffer or sharp

sharp(image)
    .withMetadata({
        ThumbnailImage: thumbnail
    })
    .toFile('image-with-updated-thumbnail.jpg')

Personally I think option 1) would be already enough to support most use cases, but having both might be the best case and does cover quite a wide range of scenarios where the user would just need a way to easily update the image's EXIF thumbnail.

Some examples of what the end goal is here:

  • user rotates an image and the EXIF thumbnail gets updated as well reflecting those changes
  • user composites images together and the EXIF thumbnail gets updated to reflect the changes

What alternatives have you considered?
Outlined above.

Is there a sample image that helps explain?
Not really, any image can be used to test this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant