Announcement

#1 2023-07-11 23:26:29

cliffster
Member
2023-04-10
9

How to let users search EXIF keywords?

Hi all,

I'm new to Piwigo, but not to setting up complicated software and servers.

I would like my users to be able to search for EXIF keywords in my database.  So far I can only search terms in the file names themselves, whether I'm in the image browser or the Batch Manager.

I have imported the keywords along with 20K+ images, they show up with the pictures (thanks to the AlwaysShowMetadata plugin) and I have added the following to the local config file:

<?php
$conf['show_exif_fields'] = array(
  'DateTimeOriginal',
  'Make',
  'Model',
  'UndefinedTag:0xA434',
  'COMPUTED;ApertureFNumber',
  'ExposureTime',
  'ISOSpeedRatings',
  'FocalLengthIn35mmFilm',
  'Software',
  'Keywords',);
$conf['use_exif'] = true;
$conf['use_iptc'] = true;
?>

What am I missing?  It seems like keyword searching should be a lot easier than it is...

Thanks,

-- Cliff


Environment

    Piwigo 13.8.0 Check for upgrade
    Installed on 1 February 2023, 5 months 1 week 2 days ago
    Operating system: Linux
    PHP: 7.4.33 (Show info) [2023-07-11 17:18:48]
    MySQL: 5.5.5-10.6.12-MariaDB-log [2023-07-11 17:18:48]
    Graphics Library: External ImageMagick 7.0.8-32
    Cache size N/A   never calculated Refresh

Activated plugin list 7

    Additional Pages
    AlwaysShowMetadata
    Exif View
    Exiftool Keywords
    LocalFiles Editor
    Rotate Image
    VideoJS

Offline

 

#2 2023-07-12 06:52:47

executive
Member
2017-08-16
1214

Re: How to let users search EXIF keywords?

Keywords typically come from IPTC metadata.

https://piwigo.org/doc/doku.php?id=user … n:metadata

Offline

 

#3 2023-07-12 17:59:29

cliffster
Member
2023-04-10
9

Re: How to let users search EXIF keywords?

"Executive",

Thanks for stating the obvious. 

As I said, I imported over 20K+ photos with EXIF keywords.  The keywords show up in Piwigo when I view metadata.

Now, how do I make keyword searching available to my users?

Offline

 

#4 2023-07-12 23:25:52

executive
Member
2017-08-16
1214

Re: How to let users search EXIF keywords?

you say it's obvious, but you haven't got it working.

Do you have an example photo in your gallery you can provide?

Just because you see keywords when you view the EXIF data, that doesn't necessarily mean you have imported them into your Piwigo database (again hard to say without examples). Instructions were in the link provided.

Offline

 

#5 2023-07-13 00:43:11

cliffster
Member
2023-04-10
9

Re: How to let users search EXIF keywords?

Here's a link to the photo database.  All 20K images have EXIF data.

   https://widernetphotos.chipster.org/piw … egory/1176

If not the Piwigo database, where would the program store metadata?  Is it reading it directly from the image file?

-- Cliff

Offline

 

#6 2023-07-13 01:21:23

executive
Member
2017-08-16
1214

Re: How to let users search EXIF keywords?

Nice monument.

Exactly, your metadata is being read directly from file. As I suspected, your Piwigo has not imported keywords.
You have not done any mapping (or at least you didn't show any)

Take a look at my gallery:
https://mountainmanjoe.ca/gallery/pictu … ory/nature
Do you see the 'Tags' in the photo info, and each tag is clickable? That's what it should look like when imported correctly. Then you will be able to search them.

So, you need to implement the changes as I suggested in my first reply.
And since your keywords are stored in an uncommon way, you will need to modify the code slightly to make it work.
Probably
'tags'                 => 'Keywords',
in your EXIF mapping.

You need use the read_metadata function or plugin to find the right keys to use, as was explained in the help document. Please read it carefully.

Last edited by executive (2023-07-13 01:22:01)

Offline

 

#7 2023-07-13 22:33:42

cliffster
Member
2023-04-10
9

Re: How to let users search EXIF keywords?

Thanks, executive!

So, using read_metadata, I've determined that my photos have EXIF keyword information duplicated (for redundancy and hoots) in three fields.

I've edited the CONF file to use EXIF and mapped "tags" to "Keywords"

The image pages still display the EXIF fields I've chosen, but not as tags.

What's biting my butt now? I can't seem to run the Synchronize tool.  I get a "503 Server Unavailable" error.  I've asked my hosting company to look into it.

Config information below...

Best,

-- Cliff


read_metadata gave me a full report on the metadata in my file.  Here's a sample:

EXIF Fields in FamilyWoman.JPG
FileName = FamilyWoman.JPG
FileDateTime = 1686252420
FileSize = 1868844
FileType = 2
MimeType = image/jpeg
SectionsFound = ANY_TAG, IFD0, EXIF, WINXP
COMPUTED
      html = width="2967" height="3216"
      Height = 3216
      Width = 2967
      IsColor = 1
      ByteOrderMotorola = 0
      ApertureFNumber = f/4.2
      UserComment = orig,favorites,portraits
      UserCommentEncoding = UNDEFINED
Make = EASTMAN KODAK COMPANY
Model = KODAK EASYSHARE Camera, M583
DateTime = 2013:06:15 01:34:05
YCbCrPositioning = 1
UndefinedTag:0x4746 = 0
Exif_IFD_Pointer = 256
UndefinedTag:0x8830 = 3
Keywords = orig,favorites,portraits
UserComment = orig,favorites,portraits
XPKeywords = orig,favorites,portraits


My local/config/config.inc.php file now reads:

<?php

$conf['use_exif'] = true;

$conf['show_exif_fields'] = array(
  'DateTimeOriginal',
  'Make',
  'Model',
  'Keywords'
);

$conf['use_exif_mapping'] = array('tags' => 'Keywords');

?>

Offline

 

#8 2023-07-14 02:55:10

executive
Member
2017-08-16
1214

Re: How to let users search EXIF keywords?

check your server logs. Might be a permissions issue.

Offline

 

#9 2023-07-14 23:53:09

executive
Member
2017-08-16
1214

Re: How to let users search EXIF keywords?

@EdwardMercado
Nonsense answer. you are a spam bot aren't you?

Offline

 

#10 2023-07-15 00:29:42

cliffster
Member
2023-04-10
9

Re: How to let users search EXIF keywords?

Sadly, my most excellent hosting company, MDDHosting, cannot find anything in their logs to indicate that there's an authentication issue.

Might I be overwhelming the process with a request to sync 20K+ photos?

I looked in the piwigo/.data/logs folder and there's nothing in the most recent log file about the sync.  I emptied the log file and tried again.  Still nothing except...

"[2023-07-14 18:24:47]    [DEBUG]    [admin/intro::281] recent activity calculated in 0.070 s"

Is there a verbose mode?  Another log?

Should I reinstall and try again?

-- Cliff

Offline

 

#11 2023-07-15 01:01:12

cliffster
Member
2023-04-10
9

Re: How to let users search EXIF keywords?

OK. 

One more thing: I can do tons of things to change themes, configurations, etc. but ONE thing does not work: when I edit piwigo/admin.php?page=configuration | General tab, I also get a 504 error.

If I weren't already bald, I'd tear my hair out... <grin>

-- Cliff

Offline

 

#12 2023-07-15 01:25:26

cliffster
Member
2023-04-10
9

Re: How to let users search EXIF keywords?

Did a little more digging and found that the TAGS table has 49 records from today's attempt to sync.

It also has 13 records from yesterday and 40 records from the previous day.

Could this be a SQL problem?   10.6.12-MariaDB

The Piwigo interface lists 0 tags.

Offline

 

Board footer

Powered by FluxBB

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