[wp-trac] [WordPress Trac] #5162: Extract additional image metadata
from EXIF/IPTC
WordPress Trac
wp-trac at lists.automattic.com
Mon Oct 8 08:25:56 GMT 2007
#5162: Extract additional image metadata from EXIF/IPTC
-------------------------+--------------------------------------------------
Reporter: tellyworth | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.5
Component: General | Version:
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
The included patch extracts EXIF and IPTC metadata from uploaded files and
stores it in the attachment metadata. The additional metadata may be used
by plugins or future features (photoblogging in particular).
Currently it stores 10 fields: aperture, credit, camera (model), caption,
created_timestamp, copyright, focal_length, iso, shutter_speed and title.
I selected these because they're likely to be useful, and are easy to
extract (I don't think it's desirable to store every EXIF field as most
will never be used).
The code as submitted here uses PHP's built-in EXIF and IPTC functions.
PHP's EXIF functions have some shortcomings and aren't always available,
so it would make sense to expand it to use external EXIF libraries where
available (Exifer, PEL).
The only place the extra image metadata is displayed at present is on the
Manage/Uploads/Edit tab. It's a bit rough, intended mainly for testing.
Plugins and other code can access the image metadata using the regular
metadata api, like so:
{{{
$meta = wp_get_attachment_metadata( $id );
echo "Caption: " . $meta['image_meta']['caption'];
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/5162>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list