Process of naming images

Events happening in the community are now at Drupal community events on www.drupal.org.
merlinus3000's picture

Hello,

In a newspaper website, there is a lot of pictures uploaded.

So the question is quite simple :) : how do you manage to name all of your pictures/images or the way you organise them so you can find them easily later. Or you dont care about that and you just upload them ?

Or is there an automatic renaming module (dont know if there is one) and you just add a description and a few keywords and hope to find it back when you need it.

Thanks for sharing your experience about this matter.

Comments

print or web

stdbrouw@groups.drupal.org's picture

Do want them organized for a news website, or do you want to organize them with Drupal in order to use them in a print product?

First case: the filename doesn't matter, if you use the standard image module functionality (images-as-nodes) you can add categories to the node type (I would suggest different vocabs for basic keywords, people, organisations and locations). Then you can search for your photos / pictures by keyword or using the standard drupal search.

Second case: can be a mess. You can use the same methods as in the first case, but when it comes to actually grabbing the files you need for use in desktop publishing software, it can be tricky. All images (and derivates) are in the same directory, so you'll have to rely on people to give their images sensible filenames in the first place. I've been commissioned to make a module that allows for better print interaction, but it'll probably be mid-september before I can release it.

I'm actually using Joomla,

merlinus3000's picture

I'm actually using Joomla, but thinking about shifting to Drupal, and I want to improve the way I hanled things before.

For articles, i would use this format yymmdd_0000x.jpg for year, month, date (of the article) and the number of the picture in that day, and depending if there was many articles, so i had to keep on increasing the number by one.

But in the long run, it's not very useful.

In the new version, there might a print version, or a pdf version at the beginning to train on it.

But what exactly are you

stdbrouw@groups.drupal.org's picture

But what exactly are you trying to accomplish (or what is your existing workflow)?

Actually, it's the one

merlinus3000's picture

Actually, it's the one described above, naming pictures on a given model, then uploading in the articles folder.

But I think there is better ways to do things, and since we are gonna move to drupal, we want to have good methods from the beginning.

And in the same process, as I said before, we might try a print version (or pdf) that we could send to our subscribers.

I don't use it but...

greggles's picture

I just follow the "upload and forget" process, but there is the Upload Path module which can be used to organize images into more logical folders on the server.

--
Open Prediction Markets | Drupal Dashboard

Automatic Nodetitle Module

alex ua's picture

If your images are nodes, the Automatic Nodetitle Module can help you greatly. If you use the Node Relativity module to make the articles "parents" of image nodes you could have it rename it something like "ddmmyyyy-articlename", which would give you the ability to more easily search through your images (not sure offhand if connecting the parent and child nodes would require custom PHP or not, I suspect it does)

Alex Urevick-Ackelsberg
ZivTech: Illuminating Technology

Alex Urevick-Ackelsberg
ZivTech: Illuminating Technology

upload path

stdbrouw@groups.drupal.org's picture

@greggles: just tried that one out, and unfortunately it only works for files, not for image uploads. Might be interesting to expand on that, though.

sure - base for expansion if nothing else

greggles's picture

Well, you didn't say how you were going to upload your images ;) That's one thing in Drupal where there is definitely more than a dozen ways to get it done so it's hard to provide advice in the abstract.

If nothing else, upload path module provides an example of how something like this could be accomplished. Once you decide on a specific method for uploading your images you can look into modifying upload path (or similar) to make it work for your system.

--
Open Prediction Markets | Drupal Dashboard

physical name

merlinus3000's picture

Ok, now i know that I can have a node related to an image and that node will have a name depending on the article or the keywords i give him.

But what about the name of the file itself ? Like DSCFxxxx or DSC_xxxxx or anything_else.jpg ? No good method for them ? Because if i log on to the ftp side, there would be a mess, and also the problem of having a file having the same name and one deleting the other.

So maybe a module that would have an automatic renaming of my file from DSCFxxxx to q8eqac44joek.jpg and then having in drupal this image as a node and giving it all the keywords I need, but I'll still have the problem of recognizing my files in browsing mode.

I just went to NYT webpage, and clicked on the properties of some images, and i got that :

http://graphics8.nytimes.com/images/2008/05/19/us/19land.3371.jpg
http://graphics8.nytimes.com/images/2008/05/19/arts/Glory75.jpg
http://graphics8.nytimes.com/images/2008/05/19/world/19moth_adultry.jpg

Hope i made things clearer. Even if the ideas given here of using the nodes are just great and will be helpful later.

It's actually the other way

stdbrouw@groups.drupal.org's picture

It's actually the other way around: you create an image node, and use that to upload your image. (Although you can also import images by ftp and let drupal make the related nodes for you.) Duplicate filenames are handled by Drupal - nothing gets accidentally overwritten. You're correct that it won't be easy to find what you want on the "ftp-side" if you have a large number of photos. That would require an adaptation of the upload path module, as greggles suggested.

Token and custom module

webrat-gdo's picture

We created a custom token using Greg's excellent Token module to do this. We store our photos in /files/yyyy/mm/dd/. We also use imagecache on top of this. Here is the snippet of code from our module to create the custom module to make the Token module work this way:

/**

* Add tokens for saving uploaded files to YYYY/MM/DD folders

*/


function yourmodule_name_token_values($type) {

  if ($type == 'user') {

    $user = $object;

    $tokens['dir-date']      = date('Y/m/d');

  

    return $tokens;

  }

}


function your_module_name_token_list($type) {

  if ($type == 'user' || $type == 'all') {

    $tokens['global']['dir-date']      = t("Stores uploaded files in /yyyy/mm/dd/ folder");



    return $tokens;

  }

}

Newspapers on Drupal

Group organizers

Group categories

Topics - Newspaper on Drupal

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: