Need to implement workflow using image file URLs and image metadata
I would like to support a workflow for creating image galleries where the photographer does most things in Adobe Lightroom 2, including assigning the image title, caption and keywords. Lightroom allows for the creation of hierarchical keywords (available in XMP data as HierarchicalSubject), which I want to represent as vocabularies in Drupal 6.10. I want these image nodes to appear in taxonomy based search results, tag clouds etc. The final kicker to this is that the images themselves will reside on Amazon S3, not in the local file system of the server running Drupal at Go Daddy.
I'm relatively new to drupal. I've been lurking on drupal.org for a while, checked out a number of contributed modules, got multi-site working etc. I've been searching here and elsewhere for some more answers, but I'm just not getting all the pieces I think I need. :)
So far, things are mostly under control on the Lightroom side, with a little help from exiftool. Metadata can set and exported in a format acceptable to the Drupal node import module (e.g. tab separated values). I'm still fine tuning that... Ideally, it would be great, if at node creation, the metadata could be read directly from the image file, but if I need to make use of some other file that contains all of the metadata, that'll work for me.
The exported images themselves will be uploaded to S3 separately. This process will be performed whenever photos are ready to be added the web site: (1) Define metadata, (2) export lower-res jpeg images, (3) run exiftool on images to create single metadata file, (4) upload images to S3, (5) create corresponding nodes in drupal.
For each image on S3 I want to create a drupal node of some content type of my making using CCK. When this node is displayed, I want the S3 based image to be displayed in the node. I'm talking a single image per node here. Other node types, like a Blog or Story, may also refer to the same images. In that case, I don't know if it will make more sense to use a node reference, embed the image node using views, or simply specify the URL to the S3 based image when creating the content.
In the ideal scenario I'd like to use something like the CCK imagefield and give it the URL to the S3 image, have it read the file (HTTP request), create thumbnails (imagecache) etc., then chuck the local copy of the source image file. This will be very helpful when creating views to make galleries etc. using the image nodes.
Barring that, I would like to use some CCK field that could be set to the S3 URL and then embed the image () in the node when rendered. I've played around with the CCK link field, but it only makes an anchor. I don't want the user to have to click on the link to see the image.
Finally, I need to map the Lightroom keyword hierarchy to various vocabularies. In the beginning, I guess keeping the two in sync could be done manually. But, it would be ideal to be able to create new terms in drupal on the fly. I need to spend more time looking at the various taxonomy related modules there are out there, but if you have any pointers, I would really appreciate it.
While it would be nice to get everything working via existing modules, I'm not afraid to modify/write some code. I don't know anything about PHP, but I've been programming in Java for quite a few years now. I recently got a few Drupal books to start reading (Using Drupal, Drupal in Action and Pro Drupal Development). This should be fun! :)
Thanks for your help!
Jeff

Hi Jeff, I also have been
Hi Jeff,
I also have been asked to create an automatic way of having the image metadata (XMP) to be automatically picked up by Drupal when an image is uploaded. There are 100s/1000s of photographs that need to be uploaded and have the XMP metadata picked up automatically. This data would either be stored as individual taxonomy terms, allowing me to see all items of a particular type. Also a search is needed to be able to go through all images and pick up a word such as 'landscapes'.
Whichever way this is possible would be great, can anybody point me in the right direction please ?
Thank you,
Chandeep
Hey, someone else is out there!! :):)
Hi Chandeep:
I've not gotten very far in solving this problem. Part of the reason is that I live in a motorhome and have had sketchy internet access the last several weeks. :) My goal is to get a travel web site up and working, but with a specific workflow regarding images. My wife works with Adobe Lightroom 2, and withusinging that app, wants to set some basic meta data such as the title and caption, as well as assign hierarchical taxonomy terms. She then exports reasonable size JPEGs from the camera raw files. Using exiftool, I can see what I need. Exiftool can read IPTC and XMP data as well.
In one approach, I would like to have some drupal module of some sort input a list of image file URLs (hosted on S3 in my case) and read the metadata from each and create a node that makes use of the title and caption and adds a reference to the S3 image for viewing. I want to also extract the Lightroom hierarchical keywords and use them to map 1-to-1 to drupal hierarchical taxonomy vocabularies I've defined. Ideally, if a given term does not exist in drupal, it would be automatically created. Finally, using imageapi/imagecache, it would be nice to create thumbnails of the images for use in galleries, teasers etc. However, I don't want the original (from S3) image files to remain on the drupal server.
So, I've hacked a few things to get part way there, but then I've been off the air for a while. Starting with the CCK emfield module, I hacked to code to create a media type I called 'genericurl'. All I want the field to do is simply display the image from S3, or wherever (). I don't want it to be a link one must click (like the Link field). So, specifying the S3 URL when the node is created simply embeds the image in the page. I can manually create nodes like this on my site.
But, I was also trying to help automate the process. Like I mentioned before, it would be nice to have a module that retrieves the image from S3 and reads the metadata (perhaps based on the PHP JPEG metadata toolkit). The alternative is to run something like exiftool (http://www.sno.phy.queensu.ca/~phil/exiftool/) on the images separately and produce a file to use with something like the node import module. I don't know if that module can deal with my emfield though. Also, in terms of taxonomy, node import wants to know which column refers to which vocabulary. In my case, not all nodes will use all of the same taxonomies.
For example, using exiftool I first created this format file:
# Format file for exiftool for generating image info for Drupal importhttp://rvswithoutborders.com.s3.amazonaws.com/images/drupal-test-pics/$FileName $Title $Description $HierarchicalSubject
Setting exiftool loose on a directory with a few images results in:
http://rvswithoutborders.com.s3.amazonaws.com/images/drupal-test-pics/IMG_102361.jpg Photo 1 title Photo 1 caption. Red Rock country. National Forests|coconino|cow pies, Pets|caper, USA|arizona|sedonahttp://rvswithoutborders.com.s3.amazonaws.com/images/drupal-test-pics/IMG_102362.jpg Photo 2 title Photo 2 caption. Red Rock country. Pets|caper, USA|arizona|sedona
http://rvswithoutborders.com.s3.amazonaws.com/images/drupal-test-pics/IMG_102363.jpg Photo 3 title Photo 3 caption. Red Rock country. USA|arizona|sedona
I'm still playing around with node import to see if I can use the exiftool output to drive it. It talks about working with taxonomies, and you can see the hierarchical taxonomies in the file above.
Anyway, this is as far as I've gotten. I'm not a PHP programmer, with little familiarity with drupal module development, so my emfield hack is very unpretty. :) I don't know if this helps you terribly much, but I will update the thread as I make progress, which will be in fits an starts. Another other ideas, pointers to modules etc. would be greatly appreciated. Perhaps what I've said here will help explain better what I'm trying to accomplish.
Take care,
Jeff
Giving up for now
If you're still out there, Chandeep, I've given up on this line of pursuit for now. I've come up with an acceptable workflow whereby the images are uploaded to S3, then we use MarsEdit to create content using Markdown and post to Drupal via the blog API. It's pretty easy to specify the content, links to the images for a blog post etc. This does not give me any kind of gallery functionality etc., but it will suffice for now. I need to get going on publishing content in some form now.
Take it easy,
Jeff
I can't help but this is
I can't help but this is interesting... I have a site where I export the pictures from lightroom directly into the web. flickr or pixelpost... with a plugin in lightroom.
maybe looking at the code of pixelpost addon could help http://www.pixelpost.org/extend/addons/adobe-photoshop-lightroom-export-...
or also the gallery plugin http://gallery.menalto.com/node/71782
I like pixelpost but I would love to have all in drupal.
I would first go for a simple module that could get the exported images from lightroom... and then once we have that I would go for the tags and categories and exifs... also geolocation could be integrated with google maps module for drupal... that would be great.
How could we advertise this
How could we advertise this request in drupal community?
I'm working on similar...
Am getting back around to this for my own projects - a module to bridge exiftool and Drupal... read metadata from images attached to CCK nodes, with configurable mapping of metadata fields to CCK fields and taxonomy terms. Probably nothing to show before end of year...