wp_generate_attachment_metadata
wp_generate_attachment_metadata ( $attachment_id, $file )
Parameters:- (int) attachment_id Attachment ID to process.
- (string) file Filepath of the attached image.
Returns:- (array) Metadata for attachment.
Defined at:Change Log: - Introduced in WordPress: 2.1.0
- Deprecated in WordPress: —
Description
Generates attachment meta data and create image sub-sizes for images.