EWWW Image Optimizer - Version 5.3.1

Version Description

  • added: defer JS with Easy IO via EXACTDN_DEFER_SCRIPTS override
  • fixed: warning related to user-defined exclusions in JS and picture WebP
  • fixed: AMP compatiblity for Lazy Load and WebP rewriters was broken
  • fixed: images not loading on WPURP/WPRM print recipe pages
Download this release

Release Info

Developer nosilver4u
Plugin Icon 128x128 EWWW Image Optimizer
Version 5.3.1
Comparing to
See all releases

Code changes from version 5.3.0 to 5.3.1

changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  = 5.3.0 =
2
  * added: Easy IO replaces image URLs within style elements for page builders like Elementor and Divi
3
  * added: option to use <picture> tags for WebP rewriting
1
+ = 5.3.1 =
2
+ * added: defer JS with Easy IO via EXACTDN_DEFER_SCRIPTS override
3
+ * fixed: warning related to user-defined exclusions in JS and picture WebP
4
+ * fixed: AMP compatiblity for Lazy Load and WebP rewriters was broken
5
+ * fixed: images not loading on WPURP/WPRM print recipe pages
6
+
7
  = 5.3.0 =
8
  * added: Easy IO replaces image URLs within style elements for page builders like Elementor and Divi
9
  * added: option to use <picture> tags for WebP rewriting
classes/class-eio-alt-webp.php CHANGED
@@ -23,6 +23,14 @@ class EIO_Alt_Webp extends EIO_Page_Parser {
23
  */
24
  protected $user_exclusions = array();
25
 
 
 
 
 
 
 
 
 
26
  /**
27
  * The Alt WebP inline script contents. Current length 11704.
28
  *
@@ -353,6 +361,7 @@ class EIO_Alt_Webp extends EIO_Page_Parser {
353
  ! empty( $_GET['cornerstone'] ) ||
354
  strpos( $uri, 'cornerstone-endpoint' ) !== false ||
355
  did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ||
 
356
  ! empty( $_GET['et_fb'] ) ||
357
  ! empty( $_GET['tatsu'] ) ||
358
  ( ! empty( $_POST['action'] ) && 'tatsu_get_concepts' === $_POST['action'] ) ||
@@ -361,6 +370,7 @@ class EIO_Alt_Webp extends EIO_Page_Parser {
361
  ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ||
362
  preg_match( '/^<\?xml/', $buffer ) ||
363
  strpos( $buffer, 'amp-boilerplate' ) ||
 
364
  ewww_image_optimizer_ce_webp_enabled()
365
  ) {
366
  if ( empty( $buffer ) ) {
@@ -375,6 +385,9 @@ class EIO_Alt_Webp extends EIO_Page_Parser {
375
  if ( did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ) {
376
  ewwwio_debug_message( 'cornerstone app/preview' );
377
  }
 
 
 
378
  if ( ! empty( $_GET['et_fb'] ) ) {
379
  ewwwio_debug_message( 'et_fb' );
380
  }
@@ -396,6 +409,9 @@ class EIO_Alt_Webp extends EIO_Page_Parser {
396
  if ( strpos( $buffer, 'amp-boilerplate' ) ) {
397
  ewwwio_debug_message( 'AMP page processing' );
398
  }
 
 
 
399
  if ( ewww_image_optimizer_ce_webp_enabled() ) {
400
  ewwwio_debug_message( 'Cache Enabler WebP enabled' );
401
  }
@@ -1107,7 +1123,7 @@ class EIO_Alt_Webp extends EIO_Page_Parser {
1107
  * Load full webp script when SCRIPT_DEBUG is enabled.
1108
  */
1109
  function debug_script() {
1110
- if ( ewww_image_optimizer_is_amp() ) {
1111
  return;
1112
  }
1113
  if ( ! ewww_image_optimizer_ce_webp_enabled() ) {
@@ -1119,7 +1135,7 @@ class EIO_Alt_Webp extends EIO_Page_Parser {
1119
  * Load minified webp script when EWWW_IMAGE_OPTIMIZER_WEBP_EXTERNAL_SCRIPT is set.
1120
  */
1121
  function min_external_script() {
1122
- if ( ewww_image_optimizer_is_amp() ) {
1123
  return;
1124
  }
1125
  if ( ! ewww_image_optimizer_ce_webp_enabled() ) {
@@ -1134,7 +1150,7 @@ class EIO_Alt_Webp extends EIO_Page_Parser {
1134
  if ( defined( 'EWWW_IMAGE_OPTIMIZER_NO_JS' ) && EWWW_IMAGE_OPTIMIZER_NO_JS ) {
1135
  return;
1136
  }
1137
- if ( ewww_image_optimizer_is_amp() ) {
1138
  return;
1139
  }
1140
  ewwwio_debug_message( 'loading webp script without wp_add_inline_script' );
23
  */
24
  protected $user_exclusions = array();
25
 
26
+ /**
27
+ * A list of user-defined (element-type) exclusions, populated by validate_user_exclusions().
28
+ *
29
+ * @access protected
30
+ * @var array $user_exclusions
31
+ */
32
+ protected $user_element_exclusions = array();
33
+
34
  /**
35
  * The Alt WebP inline script contents. Current length 11704.
36
  *
361
  ! empty( $_GET['cornerstone'] ) ||
362
  strpos( $uri, 'cornerstone-endpoint' ) !== false ||
363
  did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ||
364
+ '/print/' === substr( $uri, -7 ) ||
365
  ! empty( $_GET['et_fb'] ) ||
366
  ! empty( $_GET['tatsu'] ) ||
367
  ( ! empty( $_POST['action'] ) && 'tatsu_get_concepts' === $_POST['action'] ) ||
370
  ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ||
371
  preg_match( '/^<\?xml/', $buffer ) ||
372
  strpos( $buffer, 'amp-boilerplate' ) ||
373
+ $this->is_amp() ||
374
  ewww_image_optimizer_ce_webp_enabled()
375
  ) {
376
  if ( empty( $buffer ) ) {
385
  if ( did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ) {
386
  ewwwio_debug_message( 'cornerstone app/preview' );
387
  }
388
+ if ( '/print/' === substr( $uri, -7 ) ) {
389
+ $this->debug_message( 'print page template' );
390
+ }
391
  if ( ! empty( $_GET['et_fb'] ) ) {
392
  ewwwio_debug_message( 'et_fb' );
393
  }
409
  if ( strpos( $buffer, 'amp-boilerplate' ) ) {
410
  ewwwio_debug_message( 'AMP page processing' );
411
  }
412
+ if ( $this->is_amp() ) {
413
+ ewwwio_debug_message( 'AMP page processing (is_amp)' );
414
+ }
415
  if ( ewww_image_optimizer_ce_webp_enabled() ) {
416
  ewwwio_debug_message( 'Cache Enabler WebP enabled' );
417
  }
1123
  * Load full webp script when SCRIPT_DEBUG is enabled.
1124
  */
1125
  function debug_script() {
1126
+ if ( $this->is_amp() ) {
1127
  return;
1128
  }
1129
  if ( ! ewww_image_optimizer_ce_webp_enabled() ) {
1135
  * Load minified webp script when EWWW_IMAGE_OPTIMIZER_WEBP_EXTERNAL_SCRIPT is set.
1136
  */
1137
  function min_external_script() {
1138
+ if ( $this->is_amp() ) {
1139
  return;
1140
  }
1141
  if ( ! ewww_image_optimizer_ce_webp_enabled() ) {
1150
  if ( defined( 'EWWW_IMAGE_OPTIMIZER_NO_JS' ) && EWWW_IMAGE_OPTIMIZER_NO_JS ) {
1151
  return;
1152
  }
1153
+ if ( $this->is_amp() ) {
1154
  return;
1155
  }
1156
  ewwwio_debug_message( 'loading webp script without wp_add_inline_script' );
classes/class-eio-lazy-load.php CHANGED
@@ -165,6 +165,7 @@ if ( ! class_exists( 'EIO_Lazy_Load' ) ) {
165
  strpos( $uri, 'cornerstone-endpoint' ) !== false ||
166
  ! empty( $_GET['ct_builder'] ) ||
167
  did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ||
 
168
  ! empty( $_GET['elementor-preview'] ) ||
169
  ! empty( $_GET['et_fb'] ) ||
170
  ! empty( $_GET['tatsu'] ) ||
@@ -175,7 +176,8 @@ if ( ! class_exists( 'EIO_Lazy_Load' ) ) {
175
  ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ||
176
  wp_script_is( 'twentytwenty-twentytwenty', 'enqueued' ) ||
177
  preg_match( '/^<\?xml/', $buffer ) ||
178
- strpos( $buffer, 'amp-boilerplate' )
 
179
  ) {
180
  if ( empty( $buffer ) ) {
181
  $this->debug_message( 'empty buffer' );
@@ -189,6 +191,9 @@ if ( ! class_exists( 'EIO_Lazy_Load' ) ) {
189
  if ( did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ) {
190
  $this->debug_message( 'cornerstone app/preview' );
191
  }
 
 
 
192
  if ( ! empty( $_GET['elementor-preview'] ) ) {
193
  $this->debug_message( 'elementor preview' );
194
  }
@@ -219,6 +224,9 @@ if ( ! class_exists( 'EIO_Lazy_Load' ) ) {
219
  if ( strpos( $buffer, 'amp-boilerplate' ) ) {
220
  $this->debug_message( 'AMP page processing' );
221
  }
 
 
 
222
  return $buffer;
223
  }
224
 
@@ -448,6 +456,7 @@ if ( ! class_exists( 'EIO_Lazy_Load' ) ) {
448
  * @return string The modified content with LL markup.
449
  */
450
  function parse_background_images( $buffer, $tag_type ) {
 
451
  if ( in_array( $tag_type, $this->user_element_exclusions, true ) ) {
452
  return $buffer;
453
  }
165
  strpos( $uri, 'cornerstone-endpoint' ) !== false ||
166
  ! empty( $_GET['ct_builder'] ) ||
167
  did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ||
168
+ '/print/' === substr( $uri, -7 ) ||
169
  ! empty( $_GET['elementor-preview'] ) ||
170
  ! empty( $_GET['et_fb'] ) ||
171
  ! empty( $_GET['tatsu'] ) ||
176
  ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ||
177
  wp_script_is( 'twentytwenty-twentytwenty', 'enqueued' ) ||
178
  preg_match( '/^<\?xml/', $buffer ) ||
179
+ strpos( $buffer, 'amp-boilerplate' ) ||
180
+ $this->is_amp()
181
  ) {
182
  if ( empty( $buffer ) ) {
183
  $this->debug_message( 'empty buffer' );
191
  if ( did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ) {
192
  $this->debug_message( 'cornerstone app/preview' );
193
  }
194
+ if ( '/print/' === substr( $uri, -7 ) ) {
195
+ $this->debug_message( 'print page template' );
196
+ }
197
  if ( ! empty( $_GET['elementor-preview'] ) ) {
198
  $this->debug_message( 'elementor preview' );
199
  }
224
  if ( strpos( $buffer, 'amp-boilerplate' ) ) {
225
  $this->debug_message( 'AMP page processing' );
226
  }
227
+ if ( $this->is_amp() ) {
228
+ ewwwio_debug_message( 'AMP page processing (is_amp)' );
229
+ }
230
  return $buffer;
231
  }
232
 
456
  * @return string The modified content with LL markup.
457
  */
458
  function parse_background_images( $buffer, $tag_type ) {
459
+ $this->debug_message( '<b>' . __METHOD__ . '()</b>' );
460
  if ( in_array( $tag_type, $this->user_element_exclusions, true ) ) {
461
  return $buffer;
462
  }
classes/class-eio-picture-webp.php CHANGED
@@ -23,6 +23,14 @@ class EIO_Picture_Webp extends EIO_Page_Parser {
23
  */
24
  protected $user_exclusions = array();
25
 
 
 
 
 
 
 
 
 
26
  /**
27
  * Allowed paths for Picture WebP.
28
  *
@@ -165,6 +173,7 @@ class EIO_Picture_Webp extends EIO_Page_Parser {
165
  ! empty( $_GET['cornerstone'] ) ||
166
  strpos( $uri, 'cornerstone-endpoint' ) !== false ||
167
  did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ||
 
168
  ! empty( $_GET['et_fb'] ) ||
169
  ! empty( $_GET['tatsu'] ) ||
170
  ( ! empty( $_POST['action'] ) && 'tatsu_get_concepts' === $_POST['action'] ) ||
@@ -173,6 +182,7 @@ class EIO_Picture_Webp extends EIO_Page_Parser {
173
  ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ||
174
  preg_match( '/^<\?xml/', $buffer ) ||
175
  strpos( $buffer, 'amp-boilerplate' ) ||
 
176
  ewww_image_optimizer_ce_webp_enabled()
177
  ) {
178
  if ( empty( $buffer ) ) {
@@ -187,6 +197,9 @@ class EIO_Picture_Webp extends EIO_Page_Parser {
187
  if ( did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ) {
188
  ewwwio_debug_message( 'cornerstone app/preview' );
189
  }
 
 
 
190
  if ( ! empty( $_GET['et_fb'] ) ) {
191
  ewwwio_debug_message( 'et_fb' );
192
  }
@@ -208,6 +221,9 @@ class EIO_Picture_Webp extends EIO_Page_Parser {
208
  if ( strpos( $buffer, 'amp-boilerplate' ) ) {
209
  ewwwio_debug_message( 'AMP page processing' );
210
  }
 
 
 
211
  if ( ewww_image_optimizer_ce_webp_enabled() ) {
212
  ewwwio_debug_message( 'Cache Enabler WebP enabled' );
213
  }
23
  */
24
  protected $user_exclusions = array();
25
 
26
+ /**
27
+ * A list of user-defined (element-type) exclusions, populated by validate_user_exclusions().
28
+ *
29
+ * @access protected
30
+ * @var array $user_exclusions
31
+ */
32
+ protected $user_element_exclusions = array();
33
+
34
  /**
35
  * Allowed paths for Picture WebP.
36
  *
173
  ! empty( $_GET['cornerstone'] ) ||
174
  strpos( $uri, 'cornerstone-endpoint' ) !== false ||
175
  did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ||
176
+ '/print/' === substr( $uri, -7 ) ||
177
  ! empty( $_GET['et_fb'] ) ||
178
  ! empty( $_GET['tatsu'] ) ||
179
  ( ! empty( $_POST['action'] ) && 'tatsu_get_concepts' === $_POST['action'] ) ||
182
  ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ||
183
  preg_match( '/^<\?xml/', $buffer ) ||
184
  strpos( $buffer, 'amp-boilerplate' ) ||
185
+ $this->is_amp() ||
186
  ewww_image_optimizer_ce_webp_enabled()
187
  ) {
188
  if ( empty( $buffer ) ) {
197
  if ( did_action( 'cornerstone_boot_app' ) || did_action( 'cs_before_preview_frame' ) ) {
198
  ewwwio_debug_message( 'cornerstone app/preview' );
199
  }
200
+ if ( '/print/' === substr( $uri, -7 ) ) {
201
+ $this->debug_message( 'print page template' );
202
+ }
203
  if ( ! empty( $_GET['et_fb'] ) ) {
204
  ewwwio_debug_message( 'et_fb' );
205
  }
221
  if ( strpos( $buffer, 'amp-boilerplate' ) ) {
222
  ewwwio_debug_message( 'AMP page processing' );
223
  }
224
+ if ( $this->is_amp() ) {
225
+ ewwwio_debug_message( 'AMP page processing (is_amp)' );
226
+ }
227
  if ( ewww_image_optimizer_ce_webp_enabled() ) {
228
  ewwwio_debug_message( 'Cache Enabler WebP enabled' );
229
  }
classes/class-exactdn.php CHANGED
@@ -129,6 +129,17 @@ if ( ! class_exists( 'ExactDN' ) ) {
129
  $this->scheme = $scheme;
130
  }
131
 
 
 
 
 
 
 
 
 
 
 
 
132
  // Images in post content and galleries.
133
  add_filter( 'the_content', array( $this, 'filter_the_content' ), 999999 );
134
  // Start an output buffer before any output starts.
@@ -179,6 +190,9 @@ if ( ! class_exists( 'ExactDN' ) ) {
179
  if ( $this->get_option( 'exactdn_all_the_things' ) && $this->plan_id > 1 ) {
180
  add_filter( 'style_loader_src', array( $this, 'parse_enqueue' ), 20 );
181
  add_filter( 'script_loader_src', array( $this, 'parse_enqueue' ), 20 );
 
 
 
182
  }
183
  $this->set_option( 'exactdn_prevent_db_queries', true );
184
 
@@ -270,6 +284,10 @@ if ( ! class_exists( 'ExactDN' ) ) {
270
 
271
  $site_url = $this->content_url();
272
  $home_url = home_url();
 
 
 
 
273
 
274
  $url = 'http://optimize.exactlywww.com/exactdn/activate.php';
275
  $ssl = wp_http_supports( array( 'ssl' ) );
@@ -284,6 +302,7 @@ if ( ! class_exists( 'ExactDN' ) ) {
284
  'body' => array(
285
  'site_url' => $site_url,
286
  'home_url' => $home_url,
 
287
  ),
288
  )
289
  );
@@ -632,6 +651,9 @@ if ( ! class_exists( 'ExactDN' ) ) {
632
  }
633
  }
634
  $this->user_exclusions[] = 'plugins/anti-captcha/';
 
 
 
635
  }
636
 
637
  /**
@@ -2523,6 +2545,38 @@ if ( ! class_exists( 'ExactDN' ) ) {
2523
  return $skip;
2524
  }
2525
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2526
  /**
2527
  * Converts a local script/css url to use ExactDN.
2528
  *
129
  $this->scheme = $scheme;
130
  }
131
 
132
+ $uri = $_SERVER['REQUEST_URI'];
133
+ /**
134
+ * Allow pre-empting the parsers by page.
135
+ *
136
+ * @param bool Whether to skip parsing the page.
137
+ * @param string $uri The URL of the page.
138
+ */
139
+ if ( apply_filters( 'exactdn_skip_page', false, $uri ) ) {
140
+ return;
141
+ }
142
+
143
  // Images in post content and galleries.
144
  add_filter( 'the_content', array( $this, 'filter_the_content' ), 999999 );
145
  // Start an output buffer before any output starts.
190
  if ( $this->get_option( 'exactdn_all_the_things' ) && $this->plan_id > 1 ) {
191
  add_filter( 'style_loader_src', array( $this, 'parse_enqueue' ), 20 );
192
  add_filter( 'script_loader_src', array( $this, 'parse_enqueue' ), 20 );
193
+ if ( defined( 'EXACTDN_DEFER_SCRIPTS' ) && EXACTDN_DEFER_SCRIPTS ) {
194
+ add_filter( 'script_loader_tag', array( $this, 'defer_scripts' ), 20 );
195
+ }
196
  }
197
  $this->set_option( 'exactdn_prevent_db_queries', true );
198
 
284
 
285
  $site_url = $this->content_url();
286
  $home_url = home_url();
287
+ $originip = '';
288
+ if ( ! empty( $_SERVER['SERVER_ADDR'] ) ) {
289
+ $originip = $_SERVER['SERVER_ADDR'];
290
+ }
291
 
292
  $url = 'http://optimize.exactlywww.com/exactdn/activate.php';
293
  $ssl = wp_http_supports( array( 'ssl' ) );
302
  'body' => array(
303
  'site_url' => $site_url,
304
  'home_url' => $home_url,
305
+ 'originip' => $originip,
306
  ),
307
  )
308
  );
651
  }
652
  }
653
  $this->user_exclusions[] = 'plugins/anti-captcha/';
654
+ $this->user_exclusions[] = 'fusion-app';
655
+ $this->user_exclusions[] = 'themes/Avada/';
656
+ $this->user_exclusions[] = 'plugins/fusion-builder/';
657
  }
658
 
659
  /**
2545
  return $skip;
2546
  }
2547
 
2548
+ /**
2549
+ * Converts a local script/css url to use ExactDN.
2550
+ *
2551
+ * @param string $tag URL to the resource being parsed.
2552
+ * @return string The ExactDN version of the resource, if it was local.
2553
+ */
2554
+ function defer_scripts( $tag ) {
2555
+ if ( is_admin() ) {
2556
+ return $tag;
2557
+ }
2558
+ if ( false !== strpos( $tag, 'jquery' ) ) {
2559
+ return $tag;
2560
+ }
2561
+ if ( false !== strpos( $tag, 'lazysizes' ) ) {
2562
+ if ( false !== strpos( $tag, 'ewww-image' ) || false !== strpos( $tag, 'easy-image' ) ) {
2563
+ return str_replace( '></script', ' async></script', $tag );
2564
+ }
2565
+ return $tag;
2566
+ }
2567
+ if ( false !== strpos( $tag, 'async' ) ) {
2568
+ return $tag;
2569
+ }
2570
+ if ( false !== strpos( $tag, 'defer' ) ) {
2571
+ return $tag;
2572
+ }
2573
+ $deferred_tag = str_replace( '></script', ' defer></script', $tag );
2574
+ if ( $deferred_tag && $deferred_tag !== $tag ) {
2575
+ return $deferred_tag;
2576
+ }
2577
+ return $tag;
2578
+ }
2579
+
2580
  /**
2581
  * Converts a local script/css url to use ExactDN.
2582
  *
common.php CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  exit;
15
  }
16
 
17
- define( 'EWWW_IMAGE_OPTIMIZER_VERSION', '530' );
18
 
19
  // Initialize a couple globals.
20
  $eio_debug = '';
@@ -1814,6 +1814,12 @@ function ewww_image_optimizer_lr_sync_script() {
1814
  function ewww_image_optimizer_notice_media_listmode() {
1815
  $current_screen = get_current_screen();
1816
  if ( 'upload' === $current_screen->id && ! ewww_image_optimizer_get_option( 'ewww_image_optimizer_dismiss_media_notice' ) ) {
 
 
 
 
 
 
1817
  echo "<div id='ewww-image-optimizer-media-listmode' class='notice notice-info is-dismissible'><p>" . esc_html__( 'Change the Media Library to List mode for additional image optimization information and actions.', 'ewww-image-optimizer' ) . ewwwio_help_link( 'https://docs.ewww.io/article/62-power-user-options-in-list-mode', '5b61fdd32c7d3a03f89d41c4' ) . '</p></div>';
1818
  }
1819
  }
@@ -10160,6 +10166,9 @@ function ewww_image_optimizer_options( $network = 'singlesite' ) {
10160
  if ( ewww_image_optimizer_easy_active() || $cf_host ) {
10161
  ewww_image_optimizer_webp_rewrite_verify();
10162
  }
 
 
 
10163
  if (
10164
  ! $cf_host &&
10165
  ewww_image_optimizer_get_option( 'ewww_image_optimizer_webp' ) &&
14
  exit;
15
  }
16
 
17
+ define( 'EWWW_IMAGE_OPTIMIZER_VERSION', '531' );
18
 
19
  // Initialize a couple globals.
20
  $eio_debug = '';
1814
  function ewww_image_optimizer_notice_media_listmode() {
1815
  $current_screen = get_current_screen();
1816
  if ( 'upload' === $current_screen->id && ! ewww_image_optimizer_get_option( 'ewww_image_optimizer_dismiss_media_notice' ) ) {
1817
+ $user_info = wp_get_current_user();
1818
+ if ( ! empty( $user_info->wp_media_library_mode ) && 'list' === $user_info->wp_media_library_mode ) {
1819
+ update_option( 'ewww_image_optimizer_dismiss_media_notice', true, false );
1820
+ update_site_option( 'ewww_image_optimizer_dismiss_media_notice', true );
1821
+ return;
1822
+ }
1823
  echo "<div id='ewww-image-optimizer-media-listmode' class='notice notice-info is-dismissible'><p>" . esc_html__( 'Change the Media Library to List mode for additional image optimization information and actions.', 'ewww-image-optimizer' ) . ewwwio_help_link( 'https://docs.ewww.io/article/62-power-user-options-in-list-mode', '5b61fdd32c7d3a03f89d41c4' ) . '</p></div>';
1824
  }
1825
  }
10166
  if ( ewww_image_optimizer_easy_active() || $cf_host ) {
10167
  ewww_image_optimizer_webp_rewrite_verify();
10168
  }
10169
+ if ( ! empty( $_SERVER['SERVER_ADDR'] ) ) {
10170
+ ewwwio_debug_message( 'origin: ' . $_SERVER['SERVER_ADDR'] );
10171
+ }
10172
  if (
10173
  ! $cf_host &&
10174
  ewww_image_optimizer_get_option( 'ewww_image_optimizer_webp' ) &&
ewww-image-optimizer.php CHANGED
@@ -13,7 +13,7 @@ Plugin Name: EWWW Image Optimizer
13
  Plugin URI: https://wordpress.org/plugins/ewww-image-optimizer/
14
  Description: Reduce file sizes for images within WordPress including NextGEN Gallery and GRAND FlAGallery. Uses jpegtran, optipng/pngout, and gifsicle.
15
  Author: Exactly WWW
16
- Version: 5.3.0
17
  Author URI: https://ewww.io/
18
  License: GPLv3
19
  */
13
  Plugin URI: https://wordpress.org/plugins/ewww-image-optimizer/
14
  Description: Reduce file sizes for images within WordPress including NextGEN Gallery and GRAND FlAGallery. Uses jpegtran, optipng/pngout, and gifsicle.
15
  Author: Exactly WWW
16
+ Version: 5.3.1
17
  Author URI: https://ewww.io/
18
  License: GPLv3
19
  */
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: optimize, image, convert, webp, resize, compress, lazy load, optimization,
5
  Requires at least: 5.0
6
  Tested up to: 5.4
7
  Requires PHP: 5.6
8
- Stable tag: 5.3.0
9
  License: GPLv3
10
 
11
  Speed up your website to better connect with your visitors. Properly compress and size/scale images. Includes lazy load and WebP convert.
@@ -173,6 +173,12 @@ https://developers.google.com/web/tools/lighthouse/audits/optimize-images
173
  * Feature requests can be viewed and submitted at https://github.com/nosilver4u/ewww-image-optimizer/labels/enhancement
174
  * If you would like to help translate this plugin in your language, get started here: https://translate.wordpress.org/projects/wp-plugins/ewww-image-optimizer/
175
 
 
 
 
 
 
 
176
  = 5.3.0 =
177
  * added: Easy IO replaces image URLs within style elements for page builders like Elementor and Divi
178
  * added: option to use <picture> tags for WebP rewriting
5
  Requires at least: 5.0
6
  Tested up to: 5.4
7
  Requires PHP: 5.6
8
+ Stable tag: 5.3.1
9
  License: GPLv3
10
 
11
  Speed up your website to better connect with your visitors. Properly compress and size/scale images. Includes lazy load and WebP convert.
173
  * Feature requests can be viewed and submitted at https://github.com/nosilver4u/ewww-image-optimizer/labels/enhancement
174
  * If you would like to help translate this plugin in your language, get started here: https://translate.wordpress.org/projects/wp-plugins/ewww-image-optimizer/
175
 
176
+ = 5.3.1 =
177
+ * added: defer JS with Easy IO via EXACTDN_DEFER_SCRIPTS override
178
+ * fixed: warning related to user-defined exclusions in JS and picture WebP
179
+ * fixed: AMP compatiblity for Lazy Load and WebP rewriters was broken
180
+ * fixed: images not loading on WPURP/WPRM print recipe pages
181
+
182
  = 5.3.0 =
183
  * added: Easy IO replaces image URLs within style elements for page builders like Elementor and Divi
184
  * added: option to use <picture> tags for WebP rewriting