{"id":20720,"date":"2012-11-12T20:46:51","date_gmt":"2012-11-12T20:46:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/image-metadata-cruncher\/"},"modified":"2013-03-13T18:39:50","modified_gmt":"2013-03-13T18:39:50","slug":"image-metadata-cruncher","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/image-metadata-cruncher\/","author":5627872,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.8","stable_tag":"1.8","tested":"3.5.2","requires":"2.7","requires_php":"","requires_plugins":"","header_name":"Image Metadata Cruncher","header_author":"Peter Hudec","header_description":"","assets_banners_color":"","last_updated":"2013-03-13 18:39:50","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=RJYHYJJD2VKAN","header_plugin_uri":"http:\/\/peterhudec.com\/programming\/2012\/11\/13\/image-metadata-cruncher-wp-plugin\/","header_author_uri":"http:\/\/peterhudec.com","rating":4.4,"author_block_rating":0,"active_installs":100,"downloads":4796,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":"1","4":"1","5":"3"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3","1.4","1.5","1.6","1.7","1.8"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"624203","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"624203","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"624203","resolution":"3","location":"assets"}},"screenshots":{"1":"Plugin Settings","2":"Available Metadata","3":"How to Use Template tags"}},"plugin_section":[],"plugin_tags":[12056,133,4096,4098,2994],"plugin_category":[50],"plugin_contributors":[85684],"plugin_business_model":[],"class_list":["post-20720","plugin","type-plugin","status-closed","hentry","plugin_tags-exif","plugin_tags-image","plugin_tags-iptc","plugin_tags-lightroom","plugin_tags-metadata","plugin_category-media","plugin_contributors-peterhudec","plugin_committers-peterhudec"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/image-metadata-cruncher.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/image-metadata-cruncher\/assets\/screenshot-1.png?rev=624203","caption":"Plugin Settings"},{"src":"https:\/\/ps.w.org\/image-metadata-cruncher\/assets\/screenshot-2.png?rev=624203","caption":"Available Metadata"},{"src":"https:\/\/ps.w.org\/image-metadata-cruncher\/assets\/screenshot-3.png?rev=624203","caption":"How to Use Template tags"}],"raw_content":"<!--section=description-->\n<p>A must have tool for photographers who edit their images in <strong>Lightroom<\/strong> or <strong>Photomechanic<\/strong> and\ndon't want to waste their precious time by writing all the <strong>keywords<\/strong> and <strong>categories<\/strong>\nonce again by hand.<\/p>\n\n<p>WordPress by default extracts the <strong>EXIF ImageDescription<\/strong> of an uploaded image to\nthe <strong>Description<\/strong> field and the <strong>IPTC Headline<\/strong> to the <strong>Title<\/strong> field of\nthe <strong>Edit Media<\/strong> form.<\/p>\n\n<p><strong>Image Metadata Cruncher<\/strong> gives you ultimate controll over this behaviour.\nYou decide what metadata gets where and in what form.<\/p>\n\n<p>Moreover, the plugin's simple but powerfull templating system allows you to\nconvert the extracted metadata into complex strings like:<\/p>\n\n<blockquote>\n  <p>Image was taken with Canon 7D, exposure was 1\/125s and aperture was f\/2.8.<\/p>\n<\/blockquote>\n\n<p>You can even extract metadata to unlimited custom <strong>post meta<\/strong> that will be saved\nwith the image to the database.<\/p>\n\n<p>The plugin also has some usefull public methods which you can use in your code:<\/p>\n\n<p>This will return the complete metadata of the image in a stuctured array same as {ALL:PHP}.<\/p>\n\n<pre><code>$metadata = $image_metadata_cruncher-&gt;get_meta_by_path( '\/path\/to\/your\/image.jpg' );\n<\/code><\/pre>\n\n<p>The same but by attachment post ID.<\/p>\n\n<pre><code>$metadata = $image_metadata_cruncher-&gt;get_meta_by_id( $attachment_ID );\n<\/code><\/pre>\n\n<p>You can crunch an already uploaded attachment with the <code>crunch()<\/code> method.\nThe template and its indexes are optional. If missing, templates from plugin's settings will be used.<\/p>\n\n<pre><code>$template = array(\n    'title' =&gt; '{IPTC:Title}',\n    'caption' =&gt; '{IPTC:Caption}',\n    'description' =&gt; '{IPTC:Headline}',\n    'alt' =&gt; '{IPTC:Caption}',\n    'custom_meta' =&gt; array(\n        'camera-make' =&gt; '{EXIF:Make}',\n        'camera-model' =&gt; '{EXIF:Model}',\n    ),\n)\n\n$image_metadata_cruncher-&gt;crunch( $attachment_ID, $template )\n<\/code><\/pre>\n\n<!--section=installation-->\n<p>Copy the <strong>image-metadata-cruncher<\/strong> folder into the plugins directory and activate.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>Is it possible to extract metadata from already uploaded images?<\/dt>\n<dd><p>You can use the plugin's methods like this:<\/p>\n\n<p>This will return the complete metadata of the image in a stuctured array same as {ALL:PHP}.<\/p>\n\n<pre><code>$metadata = $image_metadata_cruncher-&gt;get_meta_by_path( '\/path\/to\/your\/image.jpg' );\n<\/code><\/pre>\n\n<p>The same but by attachment post ID.<\/p>\n\n<pre><code>$metadata = $image_metadata_cruncher-&gt;get_meta_by_id( $attachment_ID );\n<\/code><\/pre>\n\n<p>You can crunch an already uploaded attachment with the <code>crunch()<\/code> method:\nWhich will extract metadata from the attachment image file and\nupdate the attachment post according to the optional template array.\nTemplates from plugin settings will be used for missing indexes.<\/p>\n\n<pre><code>$template = array(\n    'title' =&gt; '{IPTC:Title}',\n    'caption' =&gt; '{IPTC:Caption}',\n    'description' =&gt; '{IPTC:Headline}',\n    'alt' =&gt; '{IPTC:Caption}',\n    'custom_meta' =&gt; array(\n        'camera-make' =&gt; '{EXIF:Make}',\n        'camera-model' =&gt; '{EXIF:Model}',\n    ),\n)\n\n$image_metadata_cruncher-&gt;crunch( $attachment_ID, $template )\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.8<\/h4>\n\n<ul>\n<li>Fixed a bug causing the <code>Invalid argument supplied for foreach()<\/code> warning.<\/li>\n<\/ul>\n\n<h4>1.7<\/h4>\n\n<ul>\n<li>Now you can also use the plugin in your code to extract and crunch metadata of an attachment post.<\/li>\n<li>The syntax highlighting should now work on every browser.<\/li>\n<li>Fixed a bug when text inserted after the syntax highlighting has been disabled didn't get saved.<\/li>\n<\/ul>\n\n<h4>1.6<\/h4>\n\n<ul>\n<li>Fixed a bug when the <strong>enable highlighting<\/strong> option didn't get saved.<\/li>\n<li>Fixed some potential security issues.<\/li>\n<\/ul>\n\n<h4>1.5<\/h4>\n\n<ul>\n<li>Fixed a bug which threw an exif_read_data() warning introduced by previous update.<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>Added keys <strong>Image:basename<\/strong>, <strong>Image:filename<\/strong> and  <strong>Image:extension<\/strong>.<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Fixed broken links to plugin settings in the plugins page.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Fixed a bug when the plugin extracted only the first item of an IPTC metadata of type array like IPTC:Keywords and IPTC:SupplementalCategories<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Fixed several bugs<\/li>\n<li>Added an option to disable syntax highlighting of template tags<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial version<\/li>\n<\/ul>","raw_excerpt":"A versatile Swiss Army Knife for extraction and processing of IPTC, EXIF and other image metadata.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/20720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=20720"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/peterhudec"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=20720"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=20720"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=20720"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=20720"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=20720"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=20720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}