attachment_thumbnail_args WordPress Filter Hook
The attachment_thumbnail_args hook is used to customize the parameters used when generating thumbnail images for attachments. This hook is used primarily for images, but can be used for any type of attachment. With this hook, you can specify the width, height, crop, and other settings for thumbnails. This hook is useful for making sure that your thumbnails are all the same size, or for generating different sizes of thumbnails for different purposes.
apply_filters( 'attachment_thumbnail_args', array $image_attachment , array $metadata , array $uploaded ) #
Filters the parameters for the attachment thumbnail creation.
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.
- 'file'
Source
Changelog
Version | Description |
---|---|
3.9.0 | Introduced. |