image_strip_meta │ filter-hook │ WP 4.5.0

Filters whether to strip metadata from images when they're resized.

This filter only applies when resizing using the Imagick editor since GD always strips profiles by default.

Usage

add_filter( 'image_strip_meta', 'wp_kama_image_strip_meta_filter' );

/**
 * Function for `image_strip_meta` filter-hook.
 * 
 * @param bool $strip_meta Whether to strip image metadata during resizing.
 *
 * @return bool
 */
function wp_kama_image_strip_meta_filter( $strip_meta ){
	// filter...
	return $strip_meta;
}
$strip_meta(true|false)
Whether to strip image metadata during resizing.
Default: true

Changelog

Since 4.5.0 Introduced.

Where the hook is called

WP_Image_Editor_Imagick::thumbnail_image()
image_strip_meta
WP_REST_Server::get_index()
image_strip_meta
wp-includes/class-wp-image-editor-imagick.php 643
if ( apply_filters( 'image_strip_meta', $strip_meta ) ) {
wp-includes/rest-api/class-wp-rest-server.php 1389
$available['image_strip_meta'] = (bool) apply_filters( 'image_strip_meta', true );

Where the hook is used in WordPress

Usage not found.