# Picture Scanner

**URL:** <https://forums.plex.tv/t/picture-scanner/19561>\
**Category:** Dev/API Corner\
**Tags:** scanner-agent-dev\
**Created:** [July 26, 2012, 3:14pm UTC](https://forums.plex.tv/t/picture-scanner/19561 "2012-07-26T15:14:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjp](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mjp](https://forums.plex.tv/u/mjp)\
**Post date:** [July 26, 2012, 3:14pm UTC](https://forums.plex.tv/t/picture-scanner/19561/1 "2012-07-26T15:14:52Z")

</div>

Suggestion
Hi,  
  
I myself is a total noob to developing scanners and such so I'm just throwing my idea out there (nothing special)  
Is there a kind soul out there that could make a Picture scanner that just reads a dir and outputs that exact folder structure to plex.  
  
I have a folder with all my photos organized in albums and just want to be able to show them on my plex.   
  
/Sincerely  
  
Johan

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [July 27, 2012, 10:54am UTC](https://forums.plex.tv/t/picture-scanner/19561/2 "2012-07-27T10:54:29Z")

</div>

That should already work for you in the existing released version, just make a Photo section.

---

<div class="post-metadata">

**Author:** ![thedenethor](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/thedenethor/32/3936_2.png) [@thedenethor](https://forums.plex.tv/u/thedenethor)\
**Post date:** [August 4, 2012, 8:02am UTC](https://forums.plex.tv/t/picture-scanner/19561/3 "2012-08-04T08:02:40Z")

</div>

> [@](#):
>
> That should already work for you in the existing released version, just make a Photo section.

  
Dear elan,  
  
Are you aware of any metadata agent or plugin specifically for Photos section? I' m tagging all my Jpgs like "kids, vacation, family" etc. But it s not possible to browse my files based on tags (like windows media center does) I'm also looking for ability to browse my library based on EXIF data of jpeg files. I could not find any plugins or agents for these purposes, any ideas?  
  
Thnx

---

<div class="post-metadata">

**Author:** ![pmxplex](https://avatars.discourse-cdn.com/v4/letter/p/6bbea6/32.png) [@pmxplex](https://forums.plex.tv/u/pmxplex)\
**Post date:** [October 2, 2012, 9:13pm UTC](https://forums.plex.tv/t/picture-scanner/19561/4 "2012-10-02T21:13:04Z")

</div>

Yes, browsing photos by EXIF Keyword tags would be the most sensible thing. Support for GPS tags would also be nice.

---

<div class="post-metadata">

**Author:** ![pmxplex](https://avatars.discourse-cdn.com/v4/letter/p/6bbea6/32.png) [@pmxplex](https://forums.plex.tv/u/pmxplex)\
**Post date:** [October 14, 2012, 9:40pm UTC](https://forums.plex.tv/t/picture-scanner/19561/5 "2012-10-14T21:40:14Z")

</div>

Another thing: the photo scanner apparently uses the file _creation_ time to detect the date at which the photo was taken. See Plex Photo Scanner.py:

```auto

created_at = time.localtime(os.path.getctime(path))

```

  
  
That might work for the case where plex would run on the camera, but for all other cases, where the photos are copied to the computer running plex some time after the photos where shot, it should use the \*modification\* time instead of the creation time.  
The file creation time is set automatically to the current time when the copying happens. The modification time however is typically set to the time of the source photos (e.g. SD card).  
  
Until a more sophisticated photo scanning is implemented using EXIF tags, I propose to s/getctime/getmtime/.

---

<div class="post-metadata">

**Author:** ![pmxplex](https://avatars.discourse-cdn.com/v4/letter/p/6bbea6/32.png) [@pmxplex](https://forums.plex.tv/u/pmxplex)\
**Post date:** [October 15, 2012, 8:38pm UTC](https://forums.plex.tv/t/picture-scanner/19561/6 "2012-10-15T20:38:57Z")

</div>

So, after fixing the ctime vs. mtime issue locally, plex provides a proper “By Year” section. During scanning, that is. After scanning has finished, the (personal) metadata agent kicks in and somehow voids all dates. After digging a little, I found class PlexPersonalMediaAgentPhotos, which for some reason does not provide any date metadata. If I patch that class to do it similarly to PlexPersonalMediaAgentMovies (which reads the file’s timestamp and adds that as ‘year’ and ‘originally\_available\_at’ metadata, all dates are fine.  
  
  
  
I had thought that when the metadata agent does not provide the date metadata, the previously gathered metadata from the scanner would be used, but alas, it’s not.  
  
  
  
So can someone with enough karma fix the photo scanner to use the mtime and the PlexPersonalMediaAgentPhotos to provide the date metadata just like the PlexPnks!ersonalMediaAgentMovies agent?  
  
  
  
Thanks!

---

<div class="post-metadata">

**Author:** ![steffenl](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@steffenl](https://forums.plex.tv/u/steffenl)\
**Post date:** [May 21, 2013, 9:18pm UTC](https://forums.plex.tv/t/picture-scanner/19561/7 "2013-05-21T21:18:48Z")

</div>

> So, after fixing the ctime vs. mtime issue locally, plex provides a proper "By Year" section. During scanning, that is. After scanning has finished, the (personal) metadata agent kicks in and somehow voids all dates. After digging a little, I found class PlexPersonalMediaAgentPhotos, which for some reason does not provide any date metadata. If I patch that class to do it similarly to PlexPersonalMediaAgentMovies (which reads the file's timestamp and adds that as 'year' and 'originally\_available\_at' metadata, all dates are fine.  
>   
> I had thought that when the metadata agent does not provide the date metadata, the previously gathered metadata from the scanner would be used, but alas, it's not.  
>   
> So can someone with enough karma fix the photo scanner to use the mtime and the PlexPersonalMediaAgentPhotos to provide the date metadata just like the PlexPnks!ersonalMediaAgentMovies agent?  
>   
> Thanks!

Hello.

Are someone working on the photo scanner?

I have a huge collection of Pictures going many years back. I was planning on using plex to view this, but&nbsp;as of now Plex is useless for me when it comes to Pictures.

Really hope this is in the pipeline.

---

<div class="post-metadata">

**Author:** ![nrutman](https://avatars.discourse-cdn.com/v4/letter/n/e9c0ed/32.png) [@nrutman](https://forums.plex.tv/u/nrutman)\
**Post date:** [May 27, 2013, 7:16pm UTC](https://forums.plex.tv/t/picture-scanner/19561/8 "2013-05-27T19:16:26Z")

</div>

Another ping here - is it possible to have the "Photos" agent choose folder artwork automatically based on what's in the folder? (e.g. first pic in folder.) &nbsp;That would be a huge improvement over the generic icon that covers my hundreds of folders...

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [May 27, 2013, 7:28pm UTC](https://forums.plex.tv/t/picture-scanner/19561/9 "2013-05-27T19:28:57Z")

</div>

It’s on our list, completely agreed 🙂

---

<div class="post-metadata">

**Author:** ![nrutman](https://avatars.discourse-cdn.com/v4/letter/n/e9c0ed/32.png) [@nrutman](https://forums.plex.tv/u/nrutman)\
**Post date:** [May 28, 2013, 8:06pm UTC](https://forums.plex.tv/t/picture-scanner/19561/10 "2013-05-28T20:06:27Z")

</div>

> It's on our list, completely agreed :)

Awesome, thanks. &nbsp;And thanks for a great product!

---

<div class="post-metadata">

**Author:** ![keflatbn](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/keflatbn/32/7235_2.png) [@keflatbn](https://forums.plex.tv/u/keflatbn)\
**Post date:** [July 30, 2013, 5:24pm UTC](https://forums.plex.tv/t/picture-scanner/19561/11 "2013-07-30T17:24:41Z")

</div>

Any news about this?  
  
Regarding the tagging part, could it be possible in combination with the multi-user/parental contol scope, to “block out” pictures with certain tags? Pictures from parties, might not be what I want the kids to see 🙂  
  
  
\Kenneth

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [July 31, 2013, 10:25am UTC](https://forums.plex.tv/t/picture-scanner/19561/12 "2013-07-31T10:25:23Z")

</div>

Should be fixed in the next release.

---

<div class="post-metadata">

**Author:** ![ratsorizzo](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@ratsorizzo](https://forums.plex.tv/u/ratsorizzo)\
**Post date:** [March 30, 2014, 7:05pm UTC](https://forums.plex.tv/t/picture-scanner/19561/13 "2014-03-30T19:05:27Z")

</div>

Is there an outlook for the next release that will have an improved photo scanner?&nbsp; I have all my photos in a pictures directory, then have year subdirectories and month subdirectories within each year.&nbsp; It appears to me that the photo scanner recursed the initial subdirectories, but once scanned, adding new directories and rescanning does not find the new subdirectories. There appears to be a cache somewhere that is not getting removed even if you delete the Photo library and re-create it.&nbsp; I have Plex version 0.9.8.18.

---

<div class="post-metadata">

**Author:** ![johanensarah](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@johanensarah](https://forums.plex.tv/u/johanensarah)\
**Post date:** [May 27, 2014, 8:36pm UTC](https://forums.plex.tv/t/picture-scanner/19561/14 "2014-05-27T20:36:45Z")

</div>

I'm happily using Plex, but I have some issues with photo's.

All my photos are black icons and if I select one picture it runs endlessly without showing the picture itself.

Is there a way to fix this?

---

<div class="post-metadata">

**Author:** ![a7medo778](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@a7medo778](https://forums.plex.tv/u/a7medo778)\
**Post date:** [June 17, 2014, 12:54pm UTC](https://forums.plex.tv/t/picture-scanner/19561/15 "2014-06-17T12:54:37Z")

</div>

ping

exif tags... any news :D

facetags and that sort of stuff is the only reason why i am not 100% in plex

---

<div class="post-metadata">

**Author:** ![giantslor](https://avatars.discourse-cdn.com/v4/letter/g/a5b964/32.png) [@giantslor](https://forums.plex.tv/u/giantslor)\
**Post date:** [June 27, 2014, 12:20am UTC](https://forums.plex.tv/t/picture-scanner/19561/16 "2014-06-27T00:20:16Z")

</div>

I would like to be able to set the scanner to scan a particular field in the Exif data in order&nbsp;to populate Plex's "Summary" field for photos. In my case, the Exif field I would like to use is "Caption-Abstract" (according to ExifTool).

---

<div class="post-metadata">

**Author:** ![Fug1](https://avatars.discourse-cdn.com/v4/letter/f/9de053/32.png) [@Fug1](https://forums.plex.tv/u/Fug1)\
**Post date:** [February 2, 2015, 8:19pm UTC](https://forums.plex.tv/t/picture-scanner/19561/17 "2015-02-02T20:19:59Z")

</div>

Another vote for a photo scanner that can pull file metadata into the summary and date fields. I'm currently using embedded XMP data for my photos. Thanks!

---

<div class="post-metadata">

**Author:** ![maxtown](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@maxtown](https://forums.plex.tv/u/maxtown)\
**Post date:** [May 6, 2015, 11:12am UTC](https://forums.plex.tv/t/picture-scanner/19561/18 "2015-05-06T11:12:01Z")

</div>

up

---

<div class="post-metadata">

**Author:** ![m3xiz](https://avatars.discourse-cdn.com/v4/letter/m/f4b2a3/32.png) [@m3xiz](https://forums.plex.tv/u/m3xiz)\
**Post date:** [August 13, 2015, 10:43am UTC](https://forums.plex.tv/t/picture-scanner/19561/19 "2015-08-13T10:43:16Z")

</div>

A good photo scanner is really a long awaited feature. With Elan saying in 2013 that it is going to happen…We are mid 2015 and still Nothing. Is there any hope?

---

<div class="post-metadata">

**Author:** ![ZeroQI](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/zeroqi/32/6522_2.png) [@ZeroQI](https://forums.plex.tv/u/ZeroQI)\
**Post date:** [August 14, 2015, 4:36pm UTC](https://forums.plex.tv/t/picture-scanner/19561/20 "2015-08-14T16:36:58Z")

</div>

One can created a test custom scanner in “Plex Media Server/Scanners/Photos/Custom Really Awesome Photos Scanner.py” and the picture library creation popup allow to select it so we can have a custom scanner for photos… The scanner cannot populate much metadata, just the year/date/title, but could create different folder categories for the pictures shall the need arise.

The agent would be the one populating the metadata info from the EXIF/XMP metadata and more especially the summary and title fields. The presence of filters in the Plez web ui for Photos library seem to indicate some undocumented level of support for metadata. What oculd be done with a scanner is populating the title with the exif data, but that doesn’t seem that useful and would require a python library that accept being loaded by the scanner…

Photo scanner source:

> <https://github.com/plexinc-plugins/Scanners.bundle/blob/master/Contents/Resources/Photos/Plex%20Photo%20Scanner.py>

  

> <https://github.com/plexinc-plugins/Scanners.bundle/blob/master/Contents/Resources/Common/PhotoFiles.py>

Dev center down but link up [https://web.archive.org/web/20140107030832/https://dev.plexapp.com/](https://web.archive.org/web/20140107030832/https://dev.plexapp.com/) (Thanks madman) but little on scanners but since i wrote my own i could possibly do it

os.path.getmtime would give last modification time

I don’t mind doing a scanner, but all i can give you so far is a way to output logs in a custom log inside Logs folder. This could give a head start to somebody…

[https://forums.plex.tv/discussion/99484/photo-agent:](https://forums.plex.tv/discussion/99484/photo-agent:)

Photos are scanned by the standard Scanner (look here: [https://github.com/plexinc-plugins/Scanners.bundle/blob/master/Contents/Resources/Photos/Plex%20Photo%20Scanner.py](https://github.com/plexinc-plugins/Scanners.bundle/blob/master/Contents/Resources/Photos/Plex%20Photo%20Scanner.py) ) and additional metadata is extracted by the media server during analysis. There is not a separate agent like there is for other types of media.

The Plex agent seems to extract the EXIF metadatas, but it doesn’t extract the XMP or the RDF…  
No agent possible so the margin for manoeuvre is reduced

[Next page](https://forums.plex.tv/t/picture-scanner/19561.md?page=2)
