Title: Max-width 100%
Last modified: May 21, 2018

---

# Max-width 100%

 *  [WPO+](https://wordpress.org/support/users/ivanpr/)
 * (@ivanpr)
 * [8 years ago](https://wordpress.org/support/topic/max-width-100/)
 * Setting max-width to a pixel size causes issues in the gmail on mobile devices.
   
   the images with the width=600px and max-width: 600px are stretched outside the
   edge with a horizontal scroll bar…
 * Screenshot: [https://i.imgur.com/1BIxQyT.png](https://i.imgur.com/1BIxQyT.png)
 * The image max-width should be 100% for full-width images.
 * I’ve unsuccessfully attempted to modify it using:
    add_filter( ‘send_images_rss_email_image_style’,‘
   rgc_email_images’, 10, 2 ); function rgc_email_images( $style, $maxwidth ) { 
   return sprintf( ‘display:block;margin: 0 auto 10px; max-width:100%;’, $maxwidth);}
 * Had to manually temporarily change:
    protected function build_image( $image_source){
 *  $rss_option = get_option( ‘rss_use_excerpt’ );
    $alignment = $this->setting[‘
   alignment’] ? $this->setting[‘alignment’] : ‘left’; $style = $this->set_image_style(
   $alignment ); $max_width = isset( $this->setting[‘image_size’] ) ? $this->setting[‘
   image_size’] : get_option( ‘sendimagesrss_image_size’, 560 ); if ( ( ‘1’ === 
   $rss_option || $this->can_process() ) && isset( $image_source[1] ) && $image_source[
   1] > $max_width ) { $style .= ‘ max-width:100%;’; }

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

 *  Plugin Author [Robin Cornett](https://wordpress.org/support/users/littlerchicken/)
 * (@littlerchicken)
 * [8 years ago](https://wordpress.org/support/topic/max-width-100/#post-10304843)
 * Looking at the code you’ve shared, I think you are using the excerpts in your
   feeds, in which case the image filter hook you want to use is `send_images_rss_excerpt_image_style`,
   not `send_images_rss_email_image_style`. That should allow you to change the 
   max width without modifying the plugin files.
 * The max-width value was originally set to pixels instead of a percentage because
   of some older email clients which do not understand max-width as a percentage
   value. More modern email clients handled the responsiveness more gracefully.
 * I have not experienced the issue shown in your screenshot–can you be more specific
   about the mobile device and email client where you encountered it? Sharing your
   feed URL may help me to troubleshoot as well.
 *  Thread Starter [WPO+](https://wordpress.org/support/users/ivanpr/)
 * (@ivanpr)
 * [8 years ago](https://wordpress.org/support/topic/max-width-100/#post-10305336)
 * Here are the settings we use:
 * Admin > Settings > Reading:
    For each article in a feed, show – Full text
 * And the plugin’s settings:
 * > [View post on imgur.com](https://imgur.com/KKakzRb)
 * With those settings I was not able to modify the output of the build_image() 
   function. Had to modify it in the source of the plugin [I know this is a bad 
   idea and will be overwritten on update].
 * As of the max-width CSS, you should place the CSS output as following:
    max-width:
   123px; max-width: 100%;
 * All the dummy email-clients will skip the last rule with the %, but follow the
   previous with the ‘px’.
 * Thank you for a great plugin!

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

The topic ‘Max-width 100%’ is closed to new replies.

 * ![](https://ps.w.org/send-images-rss/assets/icon-256x256.jpg?rev=976563)
 * [Send Images to RSS](https://wordpress.org/plugins/send-images-rss/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/send-images-rss/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/send-images-rss/)
 * [Active Topics](https://wordpress.org/support/plugin/send-images-rss/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/send-images-rss/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/send-images-rss/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [WPO+](https://wordpress.org/support/users/ivanpr/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/max-width-100/#post-10305336)
 * Status: not resolved