I want to make a responsive theme with Bootstrap 3. However, I need to automatically add the CSS class .img-responsive to every post image because I need the i
This approach is better: https://wordpress.stackexchange.com/questions/108831/add-css-class-to-every-image
function add_image_class($class){
$class .= ' additional-class';
return $class;
}
add_filter('get_image_tag_class','add_image_class');
Only caveat is that it adds the class within the edit pane when you insert new images and doesn't affect pre existing ones.