I am using Imagick with WP 5.0.3. Since version 4.5 WordPress use Imagick to create/resize thumbnails and it keeps EXIF/IPTC metadata (using GD, metadata are removed).

WordPress keep EXIF/IPTC metadata in thumbnails, but I would like to create new thumbnails without them, to remove metadata. There is image_strip_meta filter, but I can not make it work how I would like, to remove metadata. I put this inside my functions.php (inside my theme), but nothing, new thumbnails still have metadata:

add_filter ('image_strip_meta', false); // Aslo tried with "true"

I read that there were bug in WP about this (I don't know if it is fixed).

Could you please tell me what would be right way to remove metadata from thumbnails?

  • The second parameter of add_filter needs to be a callable. So it should be add_filter ('image_strip_meta', '__return_true' ); Although the default is to strip the metadata, so I don't know why your thumbnails still have the metadata. – Nathan Johnson Feb 2 at 17:50
  • I tried your updated code, but metadata (exif is still present in new thumbnails, it is not removed). Any idea why? – Advanced SEO Feb 3 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.