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

aspilicious’s picture

Status: Active » Closed (won't fix)

Both modules implement the same hooks.
Especially this one: hook_field_attach_view_alter

So it can't be used together. I'm sorry!

playfulwolf’s picture

Category: Feature request » Support request
Status: Closed (won't fix) » Active

Are there any module-based alternatives to add classes to image?

playfulwolf’s picture

Btw, 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>

i-sibbot’s picture

+1 ^^^ Definitely back PlayfulWolfs suggestion. For me its a obvious feature.

aspilicious’s picture

I'm not going to add anything anymore. I'm sorry.

yannickoo’s picture

Status: Active » Closed (won't fix)

I think we can close this issue because of aspilicious' answer in #5.

harald_’s picture

Category: Support request » Feature request
Status: Closed (won't fix) » Active

That would be a very useful feature!

I need to add the class img-responsive (bootstrap) directly to <img> tag.

yannickoo’s picture

Status: Active » Closed (won't fix)

@harald_ I can understand this but the maintainer says no, then it's no :D Sorry that you have to install another module.