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

Is there a way to strip or clear exif data when encoding a file? #1344

Closed
abishekrsrikaanth opened this issue May 3, 2024 · 2 comments
Closed

Comments

@abishekrsrikaanth
Copy link

I am using the imagick driver. Is there a way to strip or clear exif data when encoding a file?
I am trying to clear all exif data before saving the file to the Storage Driver.

@olivervogel
Copy link
Member

olivervogel commented May 3, 2024

This is not possible with the current range of features of this library. There is already an issue on this topic: #1110

Until there is an official solution, I recommend implementing the function yourself with a custom modifier accessing the Imagick::class object directly.

@abishekrsrikaanth
Copy link
Author

abishekrsrikaanth commented May 4, 2024

Will calling the stripImage() using the the core()->native() strip the metadata. I created a modifier to call this before encoding the file as below. Will this work?

public function apply(ImageInterface $image): ImageInterface
{
    $imagick = $image->core()->native();
    
    $imagick->stripImage();
}

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

No branches or pull requests

2 participants