Core Function
View Source on Trac ↗ wp_generate_attachment_metadata()
wp_generate_attachment_metadata( mixed $attachment_id, mixed $file ) Generates attachment meta data and create image sub-sizes for images.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $attachment_id int | Attachment ID to process. Required |
| $file string | Filepath of the attached image. Required |
Return Value
(array)
Metadata for attachment.
Function Information
Since Version
2.1.0
Source File
wp-admin/includes/image.php
Advertisement