0.2releasedImage Information

Provides Iptc and Exif metadata of your uploaded images

Clone URLhttps://github.com/alpacaaa/image_info.git

Add as a submodulegit submodule add https://github.com/alpacaaa/image_info.git extensions/image_info --recursive

Compatibility

2.x.x2.1.x2.2.x2.3.x2.4.x2.5.x2.6.02.6.12.6.22.6.32.6.42.6.52.6.62.6.72.6.82.6.92.6.102.6.11
NoNoNo0.2NoNoNoNoNoNoNoNoNoNoNoNoNoNo. Soon?

Readme

Image Information

Synopsis

This is a Symphony CMS extension that extracts Iptc and Exif data from uploaded images.

Server Requirements

  • PHP compiled with --enable-exif (only for exif metadata).

Installing

Install as always. You don't need to enable it.

Usage

This extension provides a sort of webservice that returns XML you can use as a dynamic datasource.

The URL to use is the following: {$root}/extensions/image_info/service.php

Image Information accepts 5 parameters:

  • section* An handle or a section id
  • entries* a set of entries ids comma separated (eg.: 1,5,7)
  • field_name* field handle of the upload field where images are stored
  • iptc whether or not to include iptc info (bool, default to true)
  • exif whether or not to include exif info (bool, default to true)

* parameter is required

To pass parameters, just append them to the url. The following is a valid possible call:

{$root}/extensions/image_info/service.php?section=my-images&entries=10,12,17,22&field_name=file&iptc=false

This would output something like this:

<image-info>
  <image path="/1431294624_14c70d71e8_b.jpg" entry_id="10">
    <iptc/>
    <exif>
      <section name="FILE">
        <data tag="FileName">1431294624_14c70d71e8_b.jpg</data>
        <data tag="FileDateTime">1269940534</data>
        ...
      </section>
      <section name="COMPUTED">
        <data tag="html">width="1024" height="768"</data>
        ...
      </section>
    </exif>
  </image>
  <image path="/s_gps.jpg" entry_id="12">
    <iptc>
      <data tag="" handle="2#000"/>
      <data tag="Description" handle="2#120">Communications</data>
      <data tag="DescriptionWriter" handle="2#122">Ian Britton</data>
      <data tag="Headline" handle="2#105">Communications</data>
      <data tag="Creator" handle="2#080">Ian Britton</data>
      <data tag="CreatorJobTitle" handle="2#085">Photographer</data>
      <data tag="Provider" handle="2#110">Ian Britton</data>
      ...
    </iptc>
    <exif>
      <section name="FILE">
        <data tag="FileName">s_gps.jpg</data>
        ...
      </section>
      <section name="COMPUTED">
        <data tag="html">width="600" height="400"</data>
        ..
      </section>
      <section name="IFD0">
        <data tag="ImageDescription">Communications</data>
        <data tag="Make">FUJIFILM</data>
        <data tag="Model">FinePixS1Pro</data>
        ...
      </section>
      <section name="THUMBNAIL">
        ...
      </section>
      <section name="EXIF">
        <data tag="FNumber">1074135040/1677721600</data>
        ...
      </section>
      <section name="GPS">
        <data tag="GPSVersion"/>
        <data tag="GPSLatitudeRef">N</data>
        <data tag="GPSLatitude">54/1,5938/100,0/1</data>
        ...
      </section>
    </exif>
  </image>
</image-info>

Yeah... you already got it! You can use a dynamic XML datasource to have these informations available on your page.

Obviously the url you supply to the DS doesn't have to be static. You can use any datasource System ID parameter output to dinamically pass parameters to the extension.

Therefore, something as simple as this would work as expected:

{$root}/extensions/image_info/service.php?section=my-images&entries={$ds-whatever}&field_name=file

Version history

Requires Symphony 2.3

Requires Symphony 2.0.7