How to fix Piwigo keywords not imported?

How to fix Piwigo keywords not imported?

I started to use Piwigo as my confidence in Flickr fades away. In Piwigo we can label the photos with keywords (tags).

Later it is very easy to do a powerful search on one or several keywords.

Once I have setup the import but the next version of Piwigo came in and the keywords started to be empty on every upload/sync.

I have forgotten about my previous fix. It took me again about half an hour to get the functionality back.

So here is an easy trick – I changed the configuration file [piwigi_home]/include/config_default.inc.php.

Please backup your original file before changing it!

The changes I made are highlighted with bold text for show_iptc and use_iptc settings to be true.

// +-----------------------------------------------------------------------+
// |                               metadata                                |
// +-----------------------------------------------------------------------+

// show_iptc: Show IPTC metadata on picture.php if asked by user
$conf['show_iptc'] = true;

// show_iptc_mapping : is used for showing IPTC metadata on picture.php
// page. For each key of the array, you need to have the same key in the
// $lang array. For example, if my first key is 'iptc_keywords' (associated
// to '2#025') then you need to have $lang['iptc_keywords'] set in
// language/$user['language']/common.lang.php. If you don't have the lang
// var set, the key will be simply displayed
//
// To know how to associated iptc_field with their meaning, use
// tools/metadata.php
$conf['show_iptc_mapping'] = array(
  'iptc_keywords'        => '2#025',
  'iptc_caption_writer'  => '2#122',
  'iptc_byline_title'    => '2#085',
  'iptc_caption'         => '2#120'
  );

// use_iptc: Use IPTC data during database synchronization with files
// metadata
$conf['use_iptc'] = true;

// use_iptc_mapping : in which IPTC fields will Piwigo find image
// information ? This setting is used during metadata synchronisation. It
// associates a piwigo_images column name to a IPTC key
$conf['use_iptc_mapping'] = array(
  'keywords'        => '2#025',
  'date_creation'   => '2#055',
  'author'          => '2#122',
  'name'            => '2#005',
  'comment'         => '2#120'
  );

 

 

Leave a Reply