suggestions needed to define a class for field per entity/node Im not sure the best way to go about this, and not so much a big programmer...

I would like to let the node creator decide whether the image in the image field should be top, left, or right. So i simply want to add class to the image div somehow.

So there should be a way to grab that info, maybe a "list" field?

Now, how to get that info over the image field?

Im thinking something like a field template for the image field (using media module)... or maybe something i heard about preprocessing in template.php?

pointer and tips appreciated!
You are looking for Image Class module - either use it directly, or use it's code - it is open source after all.


  Extends the Image formatter by adding an option to add an element class.