suggestions needed to define a class for field per entity/node
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.