Is there a way to assign css to image styles?

I don't see any drop down for custom...

Would be nice to add img-responsive style to ALL images on the site...

Is there a module that can do that? Shouldn't it be native functionality?

1 Answer 1


What you are looking for is considered theming and is done mainly in the theme's template.php file.

There is a guide available here: Add bootstrap image css class to pictures

function THEMENAME_preprocess_image_style(&$vars) {
        $vars['attributes']['class'][] = 'img-responsive'; // http://getbootstrap.com/css/#overview-responsive-images

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.