Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Dears,
I've installed the great theme (Bootstrap), but when I add the content as Article (content type) with images, all content and website to be responsive on mobile version except images, where I don't use any module for responsive images,
please your support.
Thanks a lot,
Comments
Comment #1
markhalliwelledit: sorry, premature response.
Comment #2
Argus CreditAttribution: Argus commentedThis is how I first did it. I wanted to add the
.img-responsive
class Bootstrap uses to the image field. I installed the Image Class module (and it's dependencies), and added the class to the field.But I ended up using a preprocess function in my subtheme to add that class to all image fields: Read more here.
Comment #3
markhalliwellComment #4
markhalliwellComment #6
markhalliwellComment #7
Argus CreditAttribution: Argus commentedThat seems to work fine, thanks!
Comment #8
PascalAnimateur CreditAttribution: PascalAnimateur commentedThere seems to be a problem in image.vars.php at line 17 ... I get the following php error :
[] operator not supported for strings
This breaks my sites pretty badly (WSOD).
Comment #9
markhalliwellThat is because some module is passing the class attribute as a string instead of an array (they should always be an array). You should backtrace which module (obviously one that also preprocess images) is causing this and file an issue there.
https://www.google.com/search?q=drupal+class+operator+not+supported+for+...
Comment #10
PascalAnimateur CreditAttribution: PascalAnimateur commentedThanks Mark, it turned out to be languageicons. I'll submit a patch there...
Comment #11
markhalliwellThis needs to remain open.
Comment #12
markhalliwellComment #15
markhalliwellI'm just moving this back to 7.x. If this needs re-evaluation in 8.x, create a new issue.