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

strip metadata for webp and avif #469

Merged
merged 1 commit into from
Aug 28, 2024
Merged

strip metadata for webp and avif #469

merged 1 commit into from
Aug 28, 2024

Conversation

liudongmiao
Copy link
Contributor

webp and avif is mainly for browser, it's safe to strip metadata.

@cshum Should we add a new option to do so?
Or make filters strip_exif as an option?

@cshum
Copy link
Owner

cshum commented Aug 24, 2024

It would be better to retain existing behaviour by default,
only strip metadata when the stripExif boolean is true
https://github.com/cshum/imagor/blob/master/vips/process.go#L124

@liudongmiao
Copy link
Contributor Author

@cshum As there are 3 testcase use strip_exif, and there are exif in the output data, so it's failed.

Could you update the testdata? (Or should I update the testdata in this PR?)

TODO: add support for other format
@liudongmiao
Copy link
Contributor Author

@cshum I remove the strip_exif for other format, and only for webp and avif.

However, for jpeg, the master branch strip metadata always.
And IMO, webp and avif is the similiar for web, so in the first PR, I use the hard code to remove metadata too.

@cshum
Copy link
Owner

cshum commented Aug 27, 2024

Having thought about it strip_exif is for exif metadata only, but strip metadata is for all metadata.
Should be separated as another feature instead.
Adding filter strip_metadata() and config vips-strip-metadata

#475

@cshum cshum changed the base branch from master to develop August 28, 2024 14:01
@cshum cshum merged commit d11d821 into cshum:develop Aug 28, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants