Adding Image Metadata Editing to Media

Topics: Customizing Orchard, Writing modules
Mar 30, 2012 at 1:33 AM

I want to add image metadata editing to Orchard. These are the options I can think of:

  • Extend Orchard.Media to display image metadata and allow it to be edited. But then I've forked the code.
  • Add a new module that is basically a copy of Orchard.Media but with metadata editing. Now we have two modules that do similar things.
  • ...

I'd appreciate any comments on how I might approach this. I feel sure there's at least one more alternative but unable to see it.

Dave.

Coordinator
Apr 1, 2012 at 3:11 AM

Fork Orchard, and when you're done, make a pull request.

Apr 2, 2012 at 1:47 AM
Edited Apr 2, 2012 at 1:48 AM

OK, forking Orchard.Media it is. 

Here's my feature list:

  • Use FotoFly (see http://fotofly.codeplex.com/) for metadata read/write. Does anyone know of a better/more complete library?
  • Display all recognized metadata in the Media Folders > HtmlWidget > Edit Media page.
  • Enable metadata to be edited (where permissible). Some metadata (eg Orientation and Whitebalance) is read-only by nature.
  • Remove the 'Embed' string. Has anyone ever used it?
  • Display Author and Title from the metadata in the list of media displayed in Media Folders > HtmlWidget >Contents > Manage Folder.

My motivation is to support the use of the Cascade.Gallery project (http://bigsitesdoneright.com/big-blog/orchard-cascade-gallery-tutorial-series), which displays metadata in a frontend gallery. This is of limited use if the metadata cannot be modified after upload, which the the case now.

Since I hope that these extensions to the orchard media module will become standard I 'd like to know what others think, and if other features are needed.

Dave.

Coordinator
Apr 2, 2012 at 4:57 AM

Well, I'm not sure we even need a library: there is built-in support for metadata manipulation in .NET. It should be enough for metadata such as titles, descriptions or tags. Not sure you want *all* metadata to be editable, that looks overkill.

Please don't remove the embed string. It is less useful now that we have the media picker, but I don't see a strong reason to remove it.

Apr 2, 2012 at 5:28 AM

OK I am happy to use the .NET metadata classes directly.

I should have said 'all the metadata that we recognize' instead of all metadata. I will try to make the metadata as easily extensible as possible, as there is no such thing as a 'complete' set of metadata -- it can be extended by anyone. Personally, I need information about embedded artworks, the artist and copyright, so that will be there. But I will include EXIF data (mainly exposure and camera data), GPS data, and all the common data such as Author, DateDigitized, etc, as well as IPTC data (Caption,  Copyright, etc). It is hard to draw a line so will start with a subset that can be extended.

And the 'Embed' string stays.