Title: [img] not working
Last modified: August 30, 2016

---

# [img] not working

 *  Resolved [sejb](https://wordpress.org/support/users/sejb/)
 * (@sejb)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/img-not-working/)
 * I’m trying to use the [img class=”rounded” responsive=”true”] [/img], and no 
   matter what I try it simply won’t work. The image won’t even show up. Is there
   some trick to get this to work?
 * [https://wordpress.org/plugins/bootstrap-3-shortcodes/](https://wordpress.org/plugins/bootstrap-3-shortcodes/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [zisoft](https://wordpress.org/support/users/zisoft/)
 * (@zisoft)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/img-not-working/#post-6295340)
 * This is a bug I mentioned [in my post here](https://wordpress.org/support/topic/shortcode-img-lacks-instantiation-of-class-variable?replies=1).
   The variable `$class` is not initalized.
 * To fix it, open `bootstrap_shortcodes.php` in your editor and go to line 1734.
   Insert the line
 * `$class = "";`
 *  so that the code looks like this:
 *     ```
       $class = "";
       $class .= ( $atts['type'] )       ? 'img-' . $atts['type'] . ' ' : '';
       $class .= ( $atts['responsive']   == 'true' ) ? ' img-responsive' : '';
       $class .= ( $atts['xclass'] )     ? ' ' . $atts['xclass'] : '';
       ```
   
 *  Thread Starter [sejb](https://wordpress.org/support/users/sejb/)
 * (@sejb)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/img-not-working/#post-6295341)
 * Thanks for letting me know about this. Sorry I didn’t see your previous post 
   about it.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[img] not working’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bootstrap-3-shortcodes_7f6b9f.svg)
 * [Bootstrap Shortcodes for WordPress](https://wordpress.org/plugins/bootstrap-3-shortcodes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bootstrap-3-shortcodes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bootstrap-3-shortcodes/)
 * [Active Topics](https://wordpress.org/support/plugin/bootstrap-3-shortcodes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bootstrap-3-shortcodes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bootstrap-3-shortcodes/reviews/)

## Tags

 * [img](https://wordpress.org/support/topic-tag/img/)

 * 2 replies
 * 2 participants
 * Last reply from: [sejb](https://wordpress.org/support/users/sejb/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/img-not-working/#post-6295341)
 * Status: resolved