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.


Top ↑

Source

File: wp-admin/includes/image.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.