Support » Plugin: Image Widget » [Plugin: Image Widget] responsive design – image resize?

  • Resolved jannahlyon


    Not sure if this is a widget problem or a template problem, but is there a way to change the dimensions of the image for a responsive site? Right now all the images in my site get smaller when you reduce the width of the browser because I have a responsive template, but the images inside this widget do not? Any suggestions on how to fix this would be appreciated 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • Doh! I just removed the width and height values from the widget …. When you insert an image the width and height fields below are automatically filled in, so just delete those values and leave those fields blank and ta-da responsive images (if your template supports it) … sorry for the trouble 🙂

    Plugin Author Modern Tribe, Inc.



    Alternatively, I was going to suggest overriding the template for the widget in your theme.


    brilliant thanks for the advice, got it sorted this way too!

    This first fix (deleting sizes in widget box) is not working for me. My image is displaying but not resizing. How exactly do I override the template? I am not expert in php and need more of a step by step. I realize that there is a parameter for image_widget_image_width that can be disabled. How exactly do you do this?

    I have the same probleme as eepadmin, I would like to know how modify the “image_widget_image_width” to have a max-width = 100%.
    Thank ou for the answer.

    So, do we just add, in our custom widget.php:

    // Block direct requests
    if ( !defined('ABSPATH') )
    echo $before_widget;
    if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
    echo $this->get_image_html( $instance, true );
    image_widget_image_width = "100%";
    image_widget_image_height = "auto";
    if ( !empty( $description ) ) {
    	echo '<div class="'.$this->widget_options['classname'].'-description" >';
    	echo wpautop( $description );
    	echo "</div>";
    echo $after_widget;

    All I found was a “wink” about how to use these parameters to override settings. I’ll let you know whether the above code works.

    no, that just gives me a parse error.

    Where do we use these nice responsive override parameters?

    Hard code them into the “Custom” settings in widget-admin.php?

    I’ll keep mucking around. I don’t know why this is set to Resolved. I will open a new support thread on this topic.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Image Widget] responsive design – image resize?’ is closed to new replies.