Title: attachment_thumbnail_args
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( ‘attachment_thumbnail_args’, array $image_attachment, array $metadata, array $uploaded )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/attachment_thumbnail_args/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/attachment_thumbnail_args/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/attachment_thumbnail_args/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/attachment_thumbnail_args/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/attachment_thumbnail_args/?output_format=md#wp--skip-link--target)

Filters the parameters for the attachment thumbnail creation.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/attachment_thumbnail_args/?output_format=md#parameters)󠁿

 `$image_attachment`array

An array of parameters to create the thumbnail.

`$metadata`array

Current attachment metadata.

`$uploaded`array

Information about the newly-uploaded file.

 * `file` string
 * Filename of the newly-uploaded file.
 * `url` string
 * URL of the uploaded file.
 * `type` string
 * File type.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/attachment_thumbnail_args/?output_format=md#source)󠁿

    ```php
    $image_attachment = apply_filters( 'attachment_thumbnail_args', $image_attachment, $metadata, $uploaded );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/image.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/image.php#L660)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/image.php#L660-L660)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/attachment_thumbnail_args/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_generate_attachment_metadata()](https://developer.wordpress.org/reference/functions/wp_generate_attachment_metadata/)`wp-admin/includes/image.php` |

Generates attachment meta data and create image sub-sizes for images.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/attachment_thumbnail_args/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.9.0](https://developer.wordpress.org/reference/since/3.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fattachment_thumbnail_args%2F)
before being able to contribute a note or feedback.