Announcement

#1 2024-04-25 10:16:31

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
10

[resolved] Write metadata to the piwigo database.

Hello,

When importing images, how do I get their metadata into the piwigo database?

piwigo:images:name            [Title]        => 'iptc_title'          => '2#005',
piwigo:images:comment    [Description]    => 'comment'         => '2#120',
piwigo:images:autor            [Author]            => 'author'             => '2#080',
piwigo: ?                    [Tags]        => 'iptc_keywords'  => '2#025',

Import generally standardized via web form or preferably via ./galleries/. 

The question refers to the import of iptc_data.
The data is also available as Exif_Data in the image file.
I don't care which area is imported.

I have already tested various plugins. Sometimes the metadata is imported. However, I have not recognized a reproducible system.

Aim and purpose: The user should use the Piwigo search.


Environment details: https://t1p.de/a7lmj

Piwigo URL: https://pw.krasna-photo-collection.de/

Offline

 

#2 2024-04-25 11:17:47

erAck
Only trying to help
2015-09-06
2043

Re: [resolved] Write metadata to the piwigo database.

Use the LocalFiles Editor plugin (or edit directly if you know how) to add this to your local config:

Code:

// 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',
  'author'          => '2#080',
  'name'            => '2#005',
  'comment'         => '2#120'
  );

Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2024-04-25 11:35:44

Otto_Riehl
Member
Kirchlinteln, DE-NI
2024-02-29
10

Re: [resolved] Write metadata to the piwigo database.

So far I have made the following adjustment in the
"config_default.inc.php"  local/config/config.inc.php

The difference to your reference is the position of
$conf['use_iptc'] = true;
Is my previous order wrong?

This has no effect during import or synchronization.

Code:

<?php

Code:

$conf['show_exif_fields'] = array(
  'Make',
  'Model',
  'ExifVersion',
  'Software',
  'DateTimeOriginal',
  'FNumber',
  'ExposureBiasValue',
  'FILE;FileSize',
  'ExposureTime',
  'Flash',
  'ISOSpeedRatings',
  'FocalLength',
  'FocalLengthIn35mmFilm',
  'WhiteBalance',
  'ExposureMode',
  'MeteringMode',
  'ExposureProgram',
  'LightSource',
  'Contrast',
  'Saturation',
  'Sharpness',
);

/* 
$conf['show_exif'] = false;
$conf['use_exif'] = false;
*/

$conf['show_iptc_mapping'] = array(
  'iptc_title'           => '2#005',
  'iptc_byline'          => '2#080',
  'iptc_byline_title'    => '2#085',
  'iptc_byline_contact'  => '2#118',
  'iptc_keywords'        => '2#025',
  'iptc_caption'         => '2#120',
  'iptc_caption_writer'  => '2#122',
  'iptc_country_code'    => '2#100',
  'iptc_country'         => '2#101',
  'iptc_city'            => '2#090',
  'iptc_copyright'       => '2#116',
  );

$conf['use_iptc_mapping'] = array(
  'keywords'        => '2#025',
  'author'          => '2#080',
  'name'            => '2#005',
  'comment'         => '2#120',
  'country'         => '2#101',
  'copyright'       => '2#116',
  );

$conf['show_iptc'] = true;
$conf['use_iptc'] = true;


?>

Last edited by Otto_Riehl (2024-04-25 11:36:32)

Offline

 

#4 2024-04-26 00:58:34

erAck
Only trying to help
2015-09-06
2043

Re: [resolved] Write metadata to the piwigo database.

Otto_Riehl wrote:

The difference to your reference is the position of
$conf['use_iptc'] = true;
Is my previous order wrong?

The order doesn't matter.

$conf['show_exif_fields'] = array(

This does not have any effect on what is stored in the database, it is only for display purposes.

$conf['use_iptc_mapping'] = array(
[...]
  'country'         => '2#101',
  'copyright'       => '2#116',
  );

There are no country and copyright columns in table piwigo_images (unless you or some plugin added them), so that would fail.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact