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
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%;’;
}
- The topic ‘Max-width 100%’ is closed to new replies.