Skip to content

Instantly share code, notes, and snippets.

@wpsmith
Created June 30, 2012 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpsmith/3025182 to your computer and use it in GitHub Desktop.
Save wpsmith/3025182 to your computer and use it in GitHub Desktop.
wp_generate_attachment_metadata() Output
Array
(
[width] => 612
[height] => 792
[hwstring_small] => height='96' width='74'
[file] => 2012/lowercase-print-dn-letter-a-z.jpg
[sizes] => Array
(
[thumbnail] => Array
(
[file] => lowercase-print-dn-letter-a-z-120x120.jpg
[width] => 120
[height] => 120
)
[medium] => Array
(
[file] => lowercase-print-dn-letter-a-z-231x300.jpg
[width] => 231
[height] => 300
)
[worksheet-thumbnail] => Array
(
[file] => lowercase-print-dn-letter-a-z-200x320.jpg
[width] => 200
[height] => 320
)
[Mini Square] => Array
(
[file] => lowercase-print-dn-letter-a-z-70x70.jpg
[width] => 70
[height] => 70
)
[Square] => Array
(
[file] => lowercase-print-dn-letter-a-z-110x110.jpg
[width] => 110
[height] => 110
)
)
[image_meta] => Array
(
[aperture] => 0 //(string) Set to the EXIF FNumber field.
[credit] => //(string) Set to the first non-empty value found by looking through the following fields: EXIF Artist field, EXIF Author field, IPTC Credit field (2#110), IPTC Creator field (2#080)
[camera] => //(string) Set to the EXIF Model field.
=> //(string) Set to a non-empty value of one of the following fields (see source code for the precise logic involved): EXIF UserComment field, EXIF ImageDescription field, EXIF Comments field, IPTC Description field (2#120)
[created_timestamp] => 0 //(string) Set to the first non-empty value found by looking through the following fields: EXIF field DateTimeDigitized, IPTC Date and Time fields (2#055 and 2#060)
[copyright] => //(string) Set to the first non-empty value found by looking through the following fields: EXIF Copyright field, IPTC Copyright field (2#116)
[focal_length] => 0 //(string) Set to the EXIF FocalLength field.
[iso] => 0 //(string) Set to the EXIF ISOSpeedRatings field.
[shutter_speed] => 0 //(string) Set to the EXIF ExposureTime field.
[title] => //(string) Set to the first non-empty value found by looking through the following fields: EXIF Title field, IPTC Headline field (2#105), IPTC Title field (2#005), IPTC Caption field (2#120) but only if less than 80 characters, EXIF ImageDescription field but only if less than 80 characters
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment