I've used the module "Image Class" (https://drupal.org/project/image_class) for a number of projects and it works very nice for, as the name implies, adding a class to the image markup. I also use Display Suite (which rocks), but these two do not play nice together. Is there a chance we could incorporate the Image Class functionality into Display Suite so when using "Default", "Full Reset", "Minimal", and "Expert" the images can still have a class added?
By the way, adding an image class is extremely helpful for those using responsive designs such as Bootstrap since there are a number of image styles that can be applied directly to an image.
Anyway, what are your thoughts? There's also an issue filed with Image Class about it not working with Display Suite (https://drupal.org/node/2123643)
Comments
Comment #1
aspilicious commentedBoth modules implement the same hooks.
Especially this one: hook_field_attach_view_alter
So it can't be used together. I'm sorry!
Comment #2
playfulwolf commentedAre there any module-based alternatives to add classes to image?
Comment #3
playfulwolf commentedBtw, it may be a great idea to add another "Expert" field option to add classes not only to the wrappers of the element, but to the element itself. This could provide all the functionality of Image_class module and also ability to add classes to other elements, not only
<img>Comment #4
i-sibbot commented+1 ^^^ Definitely back PlayfulWolfs suggestion. For me its a obvious feature.
Comment #5
aspilicious commentedI'm not going to add anything anymore. I'm sorry.
Comment #6
yannickooI think we can close this issue because of aspilicious' answer in #5.
Comment #7
harald_ commentedThat would be a very useful feature!
I need to add the class img-responsive (bootstrap) directly to
<img>tag.Comment #8
yannickoo@harald_ I can understand this but the maintainer says no, then it's no :D Sorry that you have to install another module.