apply_filters( 'wp_generate_attachment_metadata', array $metadata, int $attachment_id, string $context )

Filters the generated attachment meta data.

Parameters Parameters


(array) An array of attachment meta data.


(int) Current attachment ID.


(string) Additional context. Can be 'create' when metadata was initially created for new attachment or 'update' when the metadata was updated.

Top ↑

Source Source

File: wp-admin/includes/image.php

View on Trac

Top ↑

Changelog Changelog

Version Description
5.3.0 The $context parameter was added.
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

Top ↑

You must log in before being able to contribute a note or feedback.