Filters the parameters for the attachment thumbnail creation.
$image_attachmentarray$metadataarray$uploadedarray$filestring
$urlstring
$typestring
wp-admin/includes/image.php:660wp_generate_attachment_metadata() * * @type string $file Filename of the newly-uploaded file. * @type string $url URL of the uploaded file. * @type string $type File type. * } */ $image_attachment = apply_filters( 'attachment_thumbnail_args', $image_attachment, $metadata, $uploaded ); $sub_attachment_id = wp_insert_attachment( $image_attachment, $uploaded['file'] ); add_post_meta( $sub_attachment_id, '_cover_hash', $hash ); $attach_data = wp_generate_attachment_metadata( $sub_attachment_id, $uploaded['file'] ); wp_update_attachment_metadata( $sub_attachment_id, $attach_data ); update_post_meta( $attachment_id, '_thumbnail_id', $sub_attachment_id );Introduced in 3.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.