Title: Responsive Sites
Last modified: August 20, 2016

---

# Responsive Sites

 *  Resolved [Artifakt Digital](https://wordpress.org/support/users/artifaktcom/)
 * (@artifaktcom)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/responsive-sites/)
 * Hey there,
 * Just wondering what’s the best practice to do for responsive sites? The images
   on ours do not appear to be responding to screen size at all.
 * Thanks!
 * [http://wordpress.org/extend/plugins/image-widget/](http://wordpress.org/extend/plugins/image-widget/)

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

 *  [mw360](https://wordpress.org/support/users/mw360/)
 * (@mw360)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/responsive-sites/#post-3434263)
 * I NEVER Recommend changing core code unless you feel comfortable in documenting/
   maintaining it through an upgrade – and I’m sure there is a simple function that
   can achieve this just don’t have the time to figure it out… but if you want a
   down and dirty temporary fix to get by for the moment this seems to work (v4.01)…
 * in /plugins/image-widget-image-widget.php…
 * Change line 285 from:
 * `$attr['style'] .= "max-width: {$instance['width']}px;";`
 * To…
 * `$attr['style'] .= "max-width: 100%;";`
 * …and change line 288 from:
 * `$attr['style'] .= "max-height: {$instance['height']}px;";`
 * To…
 * `$attr['style'] .= "height: auto;";`
 *  [Peter Chester](https://wordpress.org/support/users/peterchester/)
 * (@peterchester)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/responsive-sites/#post-3434320)
 * I don’t recommend changing code in the plugin as it will make it so you can never
   upgrade the plugin.
 * I think it’s an excellent idea to add responsive support to this plugin but for
   the interim, the way to solve this is to write your own view for the widget using
   the ‘sp_template_image-widget_widget’ filter.
 * See the “Default vs. Custom Templates’ section here:
 * [http://wordpress.org/extend/plugins/image-widget/other_notes/](http://wordpress.org/extend/plugins/image-widget/other_notes/)
 *  Thread Starter [Artifakt Digital](https://wordpress.org/support/users/artifaktcom/)
 * (@artifaktcom)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/responsive-sites/#post-3434321)
 * Cool. Thanks Peter! I’ll give that a shot.
 * Hope to see an update to make the plugin responsive in the future!
 *  [mw360](https://wordpress.org/support/users/mw360/)
 * (@mw360)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/responsive-sites/#post-3434325)
 * Hey Peter,
 * Thanks for the update.
 * As stated I completely agree regarding code changes – but sometimes folks are
   faced with the need to get things going temporarily while trying to work out 
   the proper solution, as was the case for me.
 * I will review the document you pointed to for future reference, thanks for that–
   but also, wanted to mention there is another (PROPER) way users can make this
   plugin responsive as it stands today – by adding a variation of the following
   to the theme’s custom CSS (it should work as shown for most):
 * `.widget_sp_image img {height:auto !important;max-width:100% !important;}`
 * For those who don’t want to mess with filters this is certainly a more suitable
   alternative vs. the temp code mod.
 * Cheers

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

The topic ‘Responsive Sites’ is closed to new replies.

 * ![](https://ps.w.org/image-widget/assets/icon-256x256.png?rev=2489603)
 * [Image Widget](https://wordpress.org/plugins/image-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/image-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/image-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/image-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/image-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/image-widget/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [mw360](https://wordpress.org/support/users/mw360/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/responsive-sites/#post-3434325)
 * Status: resolved