Smush Image Compression and Optimization - Version 3.3.1

Version Description

  • Fix: CDN incorrect calculation for image sizes attribute
  • Fix: Undefined index PHP notices
Download this release

Release Info

Developer jdailey
Plugin Icon 128x128 Smush Image Compression and Optimization
Version 3.3.1
Comparing to
See all releases

Code changes from version 3.3.0 to 3.3.1

core/class-settings.php CHANGED
@@ -271,9 +271,9 @@ class Settings {
271
 
272
  // Settings are taken from global settings.
273
  if ( ! empty( $global_settings ) ) {
274
- $site_settings['accessible_colors'] = $global_settings['accessible_colors'];
275
- $site_settings['usage'] = $global_settings['usage'];
276
- $site_settings['keep_data'] = $global_settings['keep_data'];
277
  }
278
  }
279
 
271
 
272
  // Settings are taken from global settings.
273
  if ( ! empty( $global_settings ) ) {
274
+ $site_settings['accessible_colors'] = isset( $global_settings['accessible_colors'] ) ? $global_settings['accessible_colors'] : $this->defaults['accessible_colors'];
275
+ $site_settings['usage'] = isset( $global_settings['usage'] ) ? $global_settings['usage'] : $this->defaults['usage'];
276
+ $site_settings['keep_data'] = isset( $global_settings['keep_data'] ) ? $global_settings['keep_data'] : $this->defaults['keep_data'];
277
  }
278
  }
279
 
core/modules/class-cdn.php CHANGED
@@ -666,7 +666,7 @@ class CDN extends Abstract_Module {
666
  // Get maximum content width.
667
  $content_width = $this->max_content_width();
668
 
669
- if ( is_array( $size ) && $size[0] > $content_width ) {
670
  return $sizes;
671
  }
672
 
@@ -1029,6 +1029,12 @@ class CDN extends Abstract_Module {
1029
  foreach ( $additional_multipliers as $multiplier ) {
1030
  // New width by multiplying with original size.
1031
  $new_width = intval( $base_width * $multiplier );
 
 
 
 
 
 
1032
  // If a nearly sized image already exist, skip.
1033
  foreach ( $current_widths as $_width ) {
1034
  if ( abs( $_width - $new_width ) < 50 || ( $new_width > $full_width ) ) {
666
  // Get maximum content width.
667
  $content_width = $this->max_content_width();
668
 
669
+ if ( is_array( $size ) && $size[0] < $content_width ) {
670
  return $sizes;
671
  }
672
 
1029
  foreach ( $additional_multipliers as $multiplier ) {
1030
  // New width by multiplying with original size.
1031
  $new_width = intval( $base_width * $multiplier );
1032
+
1033
+ // In most cases - going over the current width is not recommended and probably not what the user is expecting.
1034
+ if ( $new_width > $current_width ) {
1035
+ continue;
1036
+ }
1037
+
1038
  // If a nearly sized image already exist, skip.
1039
  foreach ( $current_widths as $_width ) {
1040
  if ( abs( $_width - $new_width ) < 50 || ( $new_width > $full_width ) ) {
languages/wp-smushit.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPLv2.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Smush 3.3.0\n"
6
  "Report-Msgid-Bugs-To: https://wpmudev.org\n"
7
- "POT-Creation-Date: 2019-10-23 06:34:12+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the GPLv2.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Smush 3.3.1\n"
6
  "Report-Msgid-Bugs-To: https://wpmudev.org\n"
7
+ "POT-Creation-Date: 2019-10-24 08:04:14+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
readme.txt CHANGED
@@ -1,13 +1,13 @@
1
  === Smush Image Compression and Optimization ===
2
  Plugin Name: Smush Image Compression and Optimization
3
- Version: 3.3.0
4
  Author: WPMU DEV
5
  Author URI: https://premium.wpmudev.org/
6
  Contributors: WPMUDEV, alexdunae
7
  Tags: image, resize, optimize, optimise, compress, performance, optimisation, lazy load, WebP, photography, optimizer, Smush WordPress Compression, Smush.it
8
  Requires at least: 4.6
9
  Tested up to: 5.3.0
10
- Stable tag: 3.3.0
11
  Requires PHP: 5.3
12
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
13
 
@@ -48,9 +48,9 @@ Smush meticulously scans every image you upload – or have already added to you
48
 
49
  In addition to smushing your media uploads, you may want to compress the images stored in other folders. Smush now lets you compress any image in any directory so that you can optimize all the images on your site – including [NextGEN](https://wordpress.org/plugins/nextgen-gallery/) images, images stored on Amazon S3 using [WP Offload Media](https://wordpress.org/plugins/amazon-s3-and-cloudfront/) and images in EVERY WordPress plugin and theme package!
50
 
51
- ### Compatible with Your Favorite Media Library Plugins
52
 
53
- No matter what plugins you use to better manage your WordPress media library, Smush has you covered. Check out just a few of the plugins Smush is working with to help make your site faster and more efficient:
54
 
55
  - [WP All Import](https://wordpress.org/plugins/wp-all-import/)
56
  - [WP Offload Media](https://wordpress.org/plugins/amazon-s3-and-cloudfront/)
@@ -58,7 +58,8 @@ No matter what plugins you use to better manage your WordPress media library, Sm
58
  - [WP Retina 2x](https://wordpress.org/plugins/wp-retina-2x/)
59
  - [NextGen Gallery](https://wordpress.org/plugins/nextgen-gallery/)
60
  - [WPML](https://wpml.org/)
61
- - [WPML Media Translation Add-on](https://wpml.org/2011/05/new-plugin-wpml-media-translation/)
 
62
  - [Styles](https://wordpress.org/plugins/styles/)
63
  - And many, many, more!
64
 
@@ -154,12 +155,18 @@ It depends what side of the pond you live on...but whether you say optimize, opt
154
 
155
  == Screenshots ==
156
 
157
- 1. Watch as your image library is processed up to 50 images at a time.
158
- 2. Set automatic smush to resize and optimize every image as it is uploaded.
159
- 3. Smush will find and optimize images for you.
 
160
 
161
  == Changelog ==
162
 
 
 
 
 
 
163
  = 3.3.0 =
164
 
165
  - New: Integration with Envira Gallery
1
  === Smush Image Compression and Optimization ===
2
  Plugin Name: Smush Image Compression and Optimization
3
+ Version: 3.3.1
4
  Author: WPMU DEV
5
  Author URI: https://premium.wpmudev.org/
6
  Contributors: WPMUDEV, alexdunae
7
  Tags: image, resize, optimize, optimise, compress, performance, optimisation, lazy load, WebP, photography, optimizer, Smush WordPress Compression, Smush.it
8
  Requires at least: 4.6
9
  Tested up to: 5.3.0
10
+ Stable tag: 3.3.1
11
  Requires PHP: 5.3
12
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
13
 
48
 
49
  In addition to smushing your media uploads, you may want to compress the images stored in other folders. Smush now lets you compress any image in any directory so that you can optimize all the images on your site – including [NextGEN](https://wordpress.org/plugins/nextgen-gallery/) images, images stored on Amazon S3 using [WP Offload Media](https://wordpress.org/plugins/amazon-s3-and-cloudfront/) and images in EVERY WordPress plugin and theme package!
50
 
51
+ ### Compatible with Your Favorite Themes, Builders and Media Library Plugins
52
 
53
+ No matter what theme or plugins you use to better manage your WordPress media library, Smush has you covered. Check out just a few of the popular products Smush is working with to help make your site faster and more efficient:
54
 
55
  - [WP All Import](https://wordpress.org/plugins/wp-all-import/)
56
  - [WP Offload Media](https://wordpress.org/plugins/amazon-s3-and-cloudfront/)
58
  - [WP Retina 2x](https://wordpress.org/plugins/wp-retina-2x/)
59
  - [NextGen Gallery](https://wordpress.org/plugins/nextgen-gallery/)
60
  - [WPML](https://wpml.org/)
61
+ - [Envira Gallery](https://enviragallery.com/)
62
+ - [Avada Fusion Builder](https://theme-fusion.com/products/fusion-builder/)
63
  - [Styles](https://wordpress.org/plugins/styles/)
64
  - And many, many, more!
65
 
155
 
156
  == Screenshots ==
157
 
158
+ 1. Simple to get started with the Smush set up wizard.
159
+ 2. Watch as your image library is processed up to 50 images at a time.
160
+ 3. Set automatic smush to resize and optimize every image as it is uploaded.
161
+ 4. Smush will find and optimize images for you.
162
 
163
  == Changelog ==
164
 
165
+ = 3.3.1 =
166
+
167
+ - Fix: CDN incorrect calculation for image sizes attribute
168
+ - Fix: Undefined index PHP notices
169
+
170
  = 3.3.0 =
171
 
172
  - New: Integration with Envira Gallery
wp-smush.php CHANGED
@@ -13,7 +13,7 @@
13
  * Plugin Name: Smush
14
  * Plugin URI: http://wordpress.org/extend/plugins/wp-smushit/
15
  * Description: Reduce image file sizes, improve performance and boost your SEO using the free <a href="https://premium.wpmudev.org/">WPMU DEV</a> WordPress Smush API.
16
- * Version: 3.3.0
17
  * Author: WPMU DEV
18
  * Author URI: https://premium.wpmudev.org/
19
  * License: GPLv2
@@ -52,7 +52,7 @@ if ( ! defined( 'WPINC' ) ) {
52
  }
53
 
54
  if ( ! defined( 'WP_SMUSH_VERSION' ) ) {
55
- define( 'WP_SMUSH_VERSION', '3.3.0' );
56
  }
57
  // Used to define body class.
58
  if ( ! defined( 'WP_SHARED_UI_VERSION' ) ) {
13
  * Plugin Name: Smush
14
  * Plugin URI: http://wordpress.org/extend/plugins/wp-smushit/
15
  * Description: Reduce image file sizes, improve performance and boost your SEO using the free <a href="https://premium.wpmudev.org/">WPMU DEV</a> WordPress Smush API.
16
+ * Version: 3.3.1
17
  * Author: WPMU DEV
18
  * Author URI: https://premium.wpmudev.org/
19
  * License: GPLv2
52
  }
53
 
54
  if ( ! defined( 'WP_SMUSH_VERSION' ) ) {
55
+ define( 'WP_SMUSH_VERSION', '3.3.1' );
56
  }
57
  // Used to define body class.
58
  if ( ! defined( 'WP_SHARED_UI_VERSION' ) ) {