{"id":1459,"date":"2018-01-21T12:59:40","date_gmt":"2018-01-21T11:59:40","guid":{"rendered":"https:\/\/www.speich.net\/articles\/?p=1459"},"modified":"2019-10-05T19:56:48","modified_gmt":"2019-10-05T17:56:48","slug":"how-to-install-exiftool-with-composer","status":"publish","type":"post","link":"https:\/\/www.speich.net\/articles\/en\/2018\/01\/21\/how-to-install-exiftool-with-composer\/","title":{"rendered":"How to install ExifTool with Composer"},"content":{"rendered":"\n<p>I&#8217;m working on a PHP project, that uses Phil Harveys excellent <a href=\"https:\/\/sno.phy.queensu.ca\/~phil\/exiftool\/\" target=\"_blank\" rel=\"noopener noreferrer\">ExifTool<\/a> to read Exif and XMP tags from photos. Since ExifTool is written in Perl, there is of course no composer.json to install this dependency directly with Composer. But you can create your own package information in your master composer.json as follows:<\/p>\n\n\n\n<pre><code class=\"language-json\">{\n    ...\n    \"repositories\": [\n        ...        \n        {\n            \"type\": \"package\",\n            \"package\": {\n                \"name\": \"philharvey\/exiftool\",\n                \"version\": \"10.75\",\n                \"dist\": {\n                    \"url\": \"https:\/\/sno.phy.queensu.ca\/~phil\/exiftool\/Image-ExifTool-10.75.tar.gz\",\n                    \"type\": \"tar\"\n                }\n            }\n        }\n    ],\n    \"require\": {\n        ...\n        \"philharvey\/exiftool\": \"10.*\"\n    }\n}<\/code><\/pre>\n\n\n\n<p>This will automatically download ExifTool version 10.75 and extract it into the vendor folder \/vendor\/philharvey\/exiftool\/<\/p>\n\n\n\n<p>Note, that the package type &#8216;tar&#8217; should extract the file completely. If that is not the case, make sure you have the latest composer version 1.6.2 installed. Some Linux distributions (e.g. Linux Mint 18.3 and probably Ubuntu 16.4 too) are still on version 1.0.0-beta2, which does not support extracting &#8216;tar.gz&#8217;. Read my quick tutorial on how to <a href=\"https:\/\/www.speich.net\/articles\/en\/2018\/01\/21\/how-to-update-composer-on-linux-mint-18-3\/\" target=\"_blank\" rel=\"noopener noreferrer\">upgrade composer on Linux Mint 18.3<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m working on a PHP project, that uses Phil Harveys excellent ExifTool to read Exif and XMP tags from photos. Since ExifTool is written in Perl, there is of course no composer.json to install this dependency directly with Composer. But you can create your own package information in your master composer.json as follows: { &#8230; &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.speich.net\/articles\/en\/2018\/01\/21\/how-to-install-exiftool-with-composer\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to install ExifTool with Composer&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[262,31,260],"class_list":["post-1459","post","type-post","status-publish","format-standard","hentry","category-photography","category-php","tag-composer","tag-exif","tag-xmp","entry"],"_links":{"self":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/1459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/comments?post=1459"}],"version-history":[{"count":6,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/1459\/revisions"}],"predecessor-version":[{"id":1650,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/posts\/1459\/revisions\/1650"}],"wp:attachment":[{"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/media?parent=1459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/categories?post=1459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.speich.net\/articles\/wp-json\/wp\/v2\/tags?post=1459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}