WordPress at a glance
filter is not described

wp_generate_attachment_metadata filter-hook . WP 2.1.0

Filters the generated attachment meta data.

Usage

add_filter( 'wp_generate_attachment_metadata', 'filter_function_name_7220', 10, 3 );
function filter_function_name_7220( $metadata, $attachment_id, $context ){
	// filter...

	return $metadata;
}
$metadata(array)
An array of attachment meta data.
$attachment_id(int)
Current attachment ID.
$context(string)
Additional context. Can be 'create' when metadata was initially created for new attachment or 'update' when the metadata was updated.

Changelog

Since 2.1.0 Introduced.
Since 5.3.0 The $context parameter was added.

Where the hook is called

wp_generate_attachment_metadata()
wp_generate_attachment_metadata
wp_update_image_subsizes()
wp_generate_attachment_metadata
wp-admin/includes/image.php 625
return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id, 'create' );
wp-admin/includes/image.php 175
$image_meta = apply_filters( 'wp_generate_attachment_metadata', $image_meta, $attachment_id, 'update' );

Where in WP core the hook is used

Usage not found!