Imagify Image Optimizer - Version 1.6.4

Version Description

  • Improvement
    • Provide a link to optimize in higher level when an image is already optimized.
    • Add a dedicated message for 413 HTTP error when the image is too big to be uploaded on our servers.
Download this release

Release Info

Developer wp_media
Plugin Icon 128x128 Imagify Image Optimizer
Version 1.6.4
Comparing to
See all releases

Code changes from version 1.6.3 to 1.6.4

imagify.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Imagify
4
  Plugin URI: https://wordpress.org/plugins/imagify/
5
  Description: Dramaticaly reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwith using Imagify, the new most advanced image optimization tool.
6
- Version: 1.6.3
7
  Author: WP Media
8
  Author URI: http://wp-media.me
9
  Licence: GPLv2
@@ -17,7 +17,7 @@ Copyright 2016 WP Media
17
  defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
18
 
19
  // Imagify defines
20
- define( 'IMAGIFY_VERSION' , '1.6.3' );
21
  define( 'IMAGIFY_SLUG' , 'imagify' );
22
  define( 'IMAGIFY_SETTINGS_SLUG' , IMAGIFY_SLUG . '_settings' );
23
  define( 'IMAGIFY_WEB_MAIN' , 'https://imagify.io' );
3
  Plugin Name: Imagify
4
  Plugin URI: https://wordpress.org/plugins/imagify/
5
  Description: Dramaticaly reduce image file sizes without losing quality, make your website load faster, boost your SEO and save money on your bandwith using Imagify, the new most advanced image optimization tool.
6
+ Version: 1.6.4
7
  Author: WP Media
8
  Author URI: http://wp-media.me
9
  Licence: GPLv2
17
  defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
18
 
19
  // Imagify defines
20
+ define( 'IMAGIFY_VERSION' , '1.6.4' );
21
  define( 'IMAGIFY_SLUG' , 'imagify' );
22
  define( 'IMAGIFY_SETTINGS_SLUG' , IMAGIFY_SLUG . '_settings' );
23
  define( 'IMAGIFY_WEB_MAIN' , 'https://imagify.io' );
inc/api/imagify.php CHANGED
@@ -102,10 +102,10 @@ function get_imagify_all_prices() {
102
 
103
  /**
104
  * Check if Coupon Code exists
105
- *
106
  * @param string $coupon the coupon code to check
107
  * @return object
108
- *
109
  * @since 1.6
110
  * @author Geoffrey Crofte
111
  **/
@@ -217,7 +217,7 @@ class Imagify {
217
  'method' => 'POST',
218
  'post_data' => $data
219
  );
220
-
221
  return $this->httpCall( 'users/', $args );
222
  }
223
 
@@ -281,9 +281,9 @@ class Imagify {
281
  $args = array(
282
  'method' => 'PUT',
283
  'post_data' => $data,
284
- 'timeout' => 10
285
  );
286
-
287
  return $this->httpCall( 'users/me/', $args );
288
  }
289
 
@@ -297,12 +297,12 @@ class Imagify {
297
  if ( isset( $this->headers['Accept'], $this->headers['Content-Type'] ) ) {
298
  unset( $this->headers['Accept'], $this->headers['Content-Type'] );
299
  }
300
-
301
  $args = array(
302
  'method' => 'POST',
303
  'post_data' => $data
304
  );
305
-
306
  return $this->httpCall( 'upload/', $args );
307
  }
308
 
@@ -382,10 +382,10 @@ class Imagify {
382
  * @return object
383
  **/
384
  private function httpCall( $url, $args = array() ) {
385
- $default = array(
386
- 'method' => 'GET',
387
- 'post_data' => null,
388
- 'timeout' => 45
389
  );
390
  $args = array_merge( $default, $args );
391
 
@@ -421,6 +421,8 @@ class Imagify {
421
 
422
  if ( 200 != $http_code && isset( $response->code, $response->detail ) ) {
423
  return new WP_Error( $http_code, $response->detail );
 
 
424
  } elseif ( 200 != $http_code ) {
425
  $http_code = (int) $http_code;
426
  $error = '' != $error ? ' - ' . htmlentities( $error ) : '';
@@ -439,4 +441,4 @@ class Imagify {
439
  function Imagify() {
440
  return Imagify::instance();
441
  }
442
- $GLOBALS['imagify'] = Imagify();
102
 
103
  /**
104
  * Check if Coupon Code exists
105
+ *
106
  * @param string $coupon the coupon code to check
107
  * @return object
108
+ *
109
  * @since 1.6
110
  * @author Geoffrey Crofte
111
  **/
217
  'method' => 'POST',
218
  'post_data' => $data
219
  );
220
+
221
  return $this->httpCall( 'users/', $args );
222
  }
223
 
281
  $args = array(
282
  'method' => 'PUT',
283
  'post_data' => $data,
284
+ 'timeout' => 10
285
  );
286
+
287
  return $this->httpCall( 'users/me/', $args );
288
  }
289
 
297
  if ( isset( $this->headers['Accept'], $this->headers['Content-Type'] ) ) {
298
  unset( $this->headers['Accept'], $this->headers['Content-Type'] );
299
  }
300
+
301
  $args = array(
302
  'method' => 'POST',
303
  'post_data' => $data
304
  );
305
+
306
  return $this->httpCall( 'upload/', $args );
307
  }
308
 
382
  * @return object
383
  **/
384
  private function httpCall( $url, $args = array() ) {
385
+ $default = array(
386
+ 'method' => 'GET',
387
+ 'post_data' => null,
388
+ 'timeout' => 45
389
  );
390
  $args = array_merge( $default, $args );
391
 
421
 
422
  if ( 200 != $http_code && isset( $response->code, $response->detail ) ) {
423
  return new WP_Error( $http_code, $response->detail );
424
+ } elseif ( 413 == $http_code ) {
425
+ return new WP_Error( $http_code, 'Your image is too big to be uploaded on our server.' );
426
  } elseif ( 200 != $http_code ) {
427
  $http_code = (int) $http_code;
428
  $error = '' != $error ? ' - ' . htmlentities( $error ) : '';
441
  function Imagify() {
442
  return Imagify::instance();
443
  }
444
+ $GLOBALS['imagify'] = Imagify();
inc/functions/admin-ui.php CHANGED
@@ -12,24 +12,24 @@ defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
12
  */
13
  function get_imagify_attachment_optimization_text( $attachment, $context = 'wp' ) {
14
  global $pagenow;
15
-
16
  $attachment_id = $attachment->id;
17
  $data = $attachment->get_data();
18
- $output = ( 'post.php' != $pagenow ) ? '<ul class="imagify-datas-list">' : '';
19
- $output_before = ( 'post.php' != $pagenow ) ? '<li class="imagify-data-item">' : '<div class="misc-pub-section misc-pub-imagify imagify-data-item">';
20
  $output_after = ( 'post.php' != $pagenow ) ? '</li>' : '</div>';
21
- $reoptimize_output = '';
22
-
23
- if ( $error = get_imagify_attachment_error_text( $attachment, $context ) ) {
24
- $error = ( 'post.php' === $pagenow ) ? $output_before . $error . $output_after : $error;
25
- return $error;
26
- }
27
 
28
  $optimization_level = $attachment->get_optimization_level_label();
29
 
30
- if ( imagify_valid_key() && $attachment->has_backup() ) {
31
- $reoptimize_link = get_imagify_attachment_reoptimize_link( $attachment, $context );
32
- $reoptimize_output = ( $reoptimize_link ) ? $reoptimize_link : '';
 
 
33
  }
34
 
35
  if ( 'post.php' !== $pagenow ) {
@@ -43,10 +43,10 @@ function get_imagify_attachment_optimization_text( $attachment, $context = 'wp'
43
  </span>';
44
 
45
  $output .= $output_before . '<span class="data">' . __( 'Original Saving:', 'imagify' ) . '</span> <strong>
46
- ' . ( ( 'post.php' != $pagenow ) ? $chart : '' ) . '<span class="imagify-chart-value">' . $data['sizes']['full']['percent'] . '</span>%</strong>' . $output_after;
47
 
48
  // more details section
49
- if ( 'post.php' != $pagenow ) {
50
  // new list
51
  $output .= '</ul>';
52
  $output .= '<p class="imagify-datas-more-action"><a href="#imagify-view-details-' . $attachment_id . '" data-close="' . __( 'Close details', 'imagify' ) . '" data-open="' . __( 'View details', 'imagify' ) . '"><span class="the-text">' . __( 'View details', 'imagify' ) . '</span><span class="dashicons dashicons-arrow-down-alt2"></span></a></p>';
@@ -64,24 +64,24 @@ function get_imagify_attachment_optimization_text( $attachment, $context = 'wp'
64
  }
65
 
66
  // end of list
67
- $output .= ( 'post.php' != $pagenow ) ? '</ul>' : '';
68
 
69
  // actions section
70
- $output .= ( 'post.php' != $pagenow ) ? '' : $output_before;
71
- $output .= '<div class="imagify-datas-actions-links">';
72
  $output .= $reoptimize_output;
73
-
74
  if ( $attachment->has_backup() ) {
75
- $args = array(
76
  'attachment_id' => $attachment_id,
77
- 'context' => $context
78
  );
79
  $class = ( 'post.php' !== $pagenow ) ? 'button-imagify-restore' : '';
80
  $output .= '<a id="imagify-restore-' . $attachment_id . '" href="' . get_imagify_admin_url( 'restore-upload', $args ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Restoring...', 'imagify' ) . '"><span class="dashicons dashicons-image-rotate"></span>' . __( 'Restore Original', 'imagify' ) . '</a>';
81
-
82
  if ( 'upload.php' != $pagenow ) {
83
  $image = wp_get_attachment_image_src( $attachment_id, 'full' );
84
-
85
  $output .= '<input id="imagify-original-src" type="hidden" value="' . $attachment->get_backup_url() . '">';
86
  $output .= '<input id="imagify-original-size" type="hidden" value="' . $attachment->get_original_size() . '">';
87
  $output .= '<input id="imagify-full-src" type="hidden" value="' . $image[0] . '">';
@@ -89,9 +89,9 @@ function get_imagify_attachment_optimization_text( $attachment, $context = 'wp'
89
  $output .= '<input id="imagify-full-height" type="hidden" value="' . $image[2] . '">';
90
  }
91
  }
92
-
93
- $output .= '</div><!-- .imagify-datas-actions-links -->';
94
- $output .= ( 'post.php' != $pagenow ) ? '' : $output_after;
95
 
96
  return $output;
97
  }
@@ -107,13 +107,13 @@ function get_imagify_attachment_optimization_text( $attachment, $context = 'wp'
107
  */
108
  function get_imagify_attachment_error_text( $attachment, $context = 'wp' ) {
109
  global $pagenow;
110
-
111
  $attachment_id = $attachment->id;
112
  $data = $attachment->get_data();
113
  $output = '';
114
  $args = array(
115
  'attachment_id' => $attachment_id,
116
- 'context' => $context
117
  );
118
 
119
  if ( isset( $data['sizes']['full']['success'] ) && ! $data['sizes']['full']['success'] ) {
@@ -135,36 +135,43 @@ function get_imagify_attachment_error_text( $attachment, $context = 'wp' ) {
135
  */
136
  function get_imagify_attachment_reoptimize_link( $attachment, $context = 'wp' ) {
137
  global $pagenow;
138
-
139
  $attachment_id = $attachment->id;
140
  $level = (int) $attachment->get_optimization_level();
141
- $args = array(
142
  'attachment_id' => $attachment_id,
143
- 'context' => $context
144
  );
145
  $output = '';
146
 
147
- if ( $attachment->has_backup() ) {
148
- $class = ( 'post.php' !== $pagenow ) ? 'button-imagify-manual-override-upload' : '';
149
-
150
- // Re-optimize to Ultra
151
- if ( 1 === $level || 0 === $level ) {
152
- $args['optimization_level'] = 2;
153
- $output .= '<a href="' . get_imagify_admin_url( 'manual-override-upload', $args ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"><span class="dashicons dashicons-admin-generic"></span>' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), __( 'Ultra', 'imagify' ) ) . '</a>';
154
- }
155
-
156
- // Re-optimize to Aggressive
157
- if ( 2 === $level || 0 === $level ) {
158
- $args['optimization_level'] = 1;
159
- $output .= '<a href="' . get_imagify_admin_url( 'manual-override-upload', $args ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"><span class="dashicons dashicons-admin-generic"></span>' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), __( 'Aggressive', 'imagify' ) ) . '</a>';
160
- }
161
-
162
- // Re-optimize to Normal
163
- if ( 2 === $level || 1 === $level ) {
164
- $args['optimization_level'] = 0;
165
- $output .= '<a href="' . get_imagify_admin_url( 'manual-override-upload', $args ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"><span class="dashicons dashicons-admin-generic"></span>' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), __( 'Normal', 'imagify' ) ) . '</a>';
166
- }
167
-
 
 
 
 
 
 
 
168
  }
169
 
170
  return $output;
@@ -180,16 +187,16 @@ function get_imagify_attachment_reoptimize_link( $attachment, $context = 'wp' )
180
  * @return string The output to print.
181
  */
182
  function get_imagify_media_column_content( $attachment, $context = 'wp' ) {
183
- $attachment_id = $attachment->id;
184
  $attachment_ext = $attachment->get_extension();
185
  $output = '';
186
-
187
  // Check if the attachment extension is allowed
188
  if ( 'wp' === $context && ! wp_attachment_is_image( $attachment_id ) ) {
189
  $output = sprintf( __( '%s can\'t be optimized', 'imagify' ), strtoupper( $attachment_ext ) );
190
  return $output;
191
  }
192
-
193
  // Check if the API key is valid
194
  if ( ! imagify_valid_key() && ! $attachment->is_optimized() ) {
195
  $output .= __( 'Invalid API key', 'imagify' );
@@ -197,10 +204,10 @@ function get_imagify_media_column_content( $attachment, $context = 'wp' ) {
197
  $output .= '<a href="' . get_imagify_admin_url( 'options-general' ) . '">' . __( 'Check your Settings', 'imagify' ) . '</a>';
198
  return $output;
199
  }
200
-
201
  $transient_context = ( 'wp' !== $context ) ? strtolower( $context ) . '-' : '';
202
  $transient_name = 'imagify-' . $transient_context . 'async-in-progress-' . $attachment_id;
203
-
204
  if ( false !== get_transient( $transient_name ) ) {
205
  $output = '<div class="button"><span class="imagify-spinner"></span>' . __( 'Optimizing...', 'imagify' ) . '</div>';
206
  return $output;
@@ -210,7 +217,7 @@ function get_imagify_media_column_content( $attachment, $context = 'wp' ) {
210
  if ( ! $attachment->is_optimized() && ! $attachment->has_error() ) {
211
  $args = array(
212
  'attachment_id' => $attachment_id,
213
- 'context' => $context
214
  );
215
  $output .= '<a id="imagify-upload-' . $attachment_id . '" href="' . get_imagify_admin_url( 'manual-upload', $args ) . '" class="button-primary button-imagify-manual-upload" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '">' . __( 'Optimize', 'imagify' ) . '</a>';
216
  return $output;
@@ -227,7 +234,7 @@ function get_imagify_media_column_content( $attachment, $context = 'wp' ) {
227
  *
228
  * @since 1.6
229
  * @author Geoffrey
230
- *
231
  * @todo add only for no-payable users?
232
  */
233
  function get_imagify_new_to_imagify() {
@@ -251,7 +258,7 @@ function get_imagify_new_to_imagify() {
251
 
252
  /**
253
  * Return the formatted price present in pricing tables
254
- *
255
  * @param float $value the price value
256
  * @return string the markuped price
257
  *
@@ -260,7 +267,7 @@ function get_imagify_new_to_imagify() {
260
  */
261
  function get_imagify_price_table_format( $value ) {
262
  $v = explode( '.', (string) $value );
263
-
264
  return '<span class="imagify-price-big">' . $v[0] . '</span> <span class="imagify-price-mini">.' . ( strlen( $v[1] ) === 1 ? $v[1] . '0' : $v[1] ) . '</span>';
265
  }
266
 
@@ -292,13 +299,13 @@ function imagify_payment_modal() {
292
  <span class="imagify-numbers-calc"><?php esc_html_e( 'We analysed your images', 'imagify' ); ?></span>
293
  <span class="imagify-numbers-notcalc"><?php esc_html_e( 'We are analysing your images', 'imagify' ); ?></span>
294
  </p>
295
-
296
  <img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>loader-balls.svg" width="77" height="48" alt="<?php esc_attr_e( 'Analyzing', 'imagify' ); ?>" class="imagify-loader">
297
 
298
  <div class="imagify-modal-cols">
299
  <div class="imagify-col">
300
  <p>
301
- <span class="imagify-border-styled"><?php
302
  printf( _n( 'You have %s image', 'You have %s images', $attachments_number, 'imagify' ), '</span><span class="imagify-big-number">' . $attachments_number . '</span><span class="imagify-border-styled">' ); ?></span>
303
  </p>
304
  </div>
@@ -420,7 +427,7 @@ additionnal Gb', 'imagify' ), '<span class="imagify-price-add-data"></span>' );
420
  <div class="imagify-submit-line">
421
  <div class="imagify-coupon-section">
422
  <p class="imagify-coupon-text">
423
-
424
  <img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>loader-balls.svg" width="60" height="36" alt="<?php esc_attr_e( 'Checking Coupon', 'imagify' ); ?>" class="imagify-coupon-loader">
425
 
426
  <label for="imagify-coupon-code"><?php _e( 'If you have a <strong>coupon code</strong><br> use it there:', 'imagify' ); ?></label>
@@ -446,15 +453,15 @@ additionnal Gb', 'imagify' ), '<span class="imagify-price-add-data"></span>' );
446
  <p class="imagify-footer-lines"><?php esc_html_e( 'Monthly plans comes with credits which is renewed every months. The billing happens automatically each month or year depending the billing period you choose.', 'imagify' ); ?></p>
447
  </div>
448
  </div><!-- .imagify-pre-checkout-view -->
449
-
450
  <?php
451
 
452
  /**
453
- *
454
  *
455
  * SECOND MODAL VIEW
456
  *
457
- *
458
  */
459
 
460
  ?>
@@ -477,7 +484,7 @@ additionnal Gb', 'imagify' ), '<span class="imagify-price-add-data"></span>' );
477
  <div class="imagify-tabs-contents">
478
 
479
  <div class="imagify-tab-content imagify-current" id="imagify-pricing-tab-monthly" role="tabpanel">
480
-
481
  <div class="imagify-modal-section section-gray">
482
  <p><?php esc_html_e( 'Monthly plans come with credits which is renewed every months. The billing happens automatically each month or year depending the billing period you choose.', 'imagify' ); ?></p>
483
  </div>
@@ -494,10 +501,10 @@ additionnal Gb', 'imagify' ), '<span class="imagify-price-add-data"></span>' );
494
 
495
 
496
  <div class="imagify-pricing-table imagify-month-selected">
497
-
498
  <script type="text/template" id="imagify-offer-monthly-template"><div class="imagify-offer-line imagify-offer-monthlies imagify-flex-table">
499
  <div class="imagify-col-details">
500
- <p class="imagify-label">
501
  <span class="imagify-the-offer">
502
  <span class="imagify-offer-size"></span>
503
  <span class="imagify-offer-by"><?php esc_html_e( '/month', 'imagify' ); ?></span>
@@ -526,7 +533,7 @@ additionnal Gb', 'imagify' ), '<span class="imagify-price-add-data"></span>' );
526
  </div>
527
  </div><!-- .imagify-offer-line --></script>
528
  </div><!-- .imagify-pricing-table -->
529
-
530
  <div class="imagify-cols">
531
  <div class="imagify-col imagify-txt-start">
532
  <p class="imagify-special-needs">
@@ -548,7 +555,7 @@ additionnal Gb', 'imagify' ), '<span class="imagify-price-add-data"></span>' );
548
  <div class="imagify-pricing-table imagify-month-selected">
549
  <script type="text/template" id="imagify-offer-onetime-template"><div class="imagify-offer-line imagify-flex-table imagify-offer-onetimes">
550
  <div class="imagify-col-details">
551
- <p class="imagify-label">
552
  <span class="imagify-the-offer">
553
  <span class="imagify-offer-size"></span>
554
  </span>
@@ -578,11 +585,11 @@ additionnal Gb', 'imagify' ), '<span class="imagify-price-add-data"></span>' );
578
  <?php
579
 
580
  /**
581
- *
582
  *
583
  * THIRD MODAL VIEW
584
  *
585
- *
586
  */
587
 
588
  ?>
@@ -594,15 +601,15 @@ additionnal Gb', 'imagify' ), '<span class="imagify-price-add-data"></span>' );
594
  <iframe data-imagify-api="<?php echo $imagify_api_key; ?>" id="imagify-payment-iframe" data-src="<?php echo IMAGIFY_PAYMENT_URL; ?>" name="imagify-payment-iframe" src="" frameborder="0"></iframe>
595
 
596
  </div><!-- .imagify-modal-views -->
597
-
598
  <?php
599
 
600
  /**
601
- *
602
  *
603
  * Succes view
604
  *
605
- *
606
  */
607
 
608
  ?>
@@ -669,7 +676,7 @@ additionnal Gb', 'imagify' ), '<span class="imagify-price-add-data"></span>' );
669
 
670
  /**
671
  * Print the discount banner used inside Payment Modal
672
- *
673
  * @return void
674
  * @author Geoffrey Crofte
675
  * @since 1.6.3
@@ -685,4 +692,4 @@ function imagify_print_discount_banner() {
685
  </div>
686
 
687
  <?php
688
- }
12
  */
13
  function get_imagify_attachment_optimization_text( $attachment, $context = 'wp' ) {
14
  global $pagenow;
15
+
16
  $attachment_id = $attachment->id;
17
  $data = $attachment->get_data();
18
+ $output = ( 'post.php' !== $pagenow ) ? '<ul class="imagify-datas-list">' : '';
19
+ $output_before = ( 'post.php' !== $pagenow ) ? '<li class="imagify-data-item">' : '<div class="misc-pub-section misc-pub-imagify imagify-data-item">';
20
  $output_after = ( 'post.php' != $pagenow ) ? '</li>' : '</div>';
21
+ $reoptimize_link = get_imagify_attachment_reoptimize_link( $attachment, $context );
22
+ $reoptimize_output = ( $reoptimize_link ) ? $reoptimize_link : '';
23
+ $reoptimize_output_before = '<div class="imagify-datas-actions-links">';
24
+ $reoptimize_output_after = '</div><!-- .imagify-datas-actions-links -->';
 
 
25
 
26
  $optimization_level = $attachment->get_optimization_level_label();
27
 
28
+ if ( $error = get_imagify_attachment_error_text( $attachment, $context ) ) {
29
+ $reoptimize_output = $reoptimize_output_before . $reoptimize_output . $reoptimize_output_after;
30
+ $error = ( 'post.php' === $pagenow ) ? $output_before . $error . $reoptimize_output . $output_after : $error . $reoptimize_output;
31
+
32
+ return $error;
33
  }
34
 
35
  if ( 'post.php' !== $pagenow ) {
43
  </span>';
44
 
45
  $output .= $output_before . '<span class="data">' . __( 'Original Saving:', 'imagify' ) . '</span> <strong>
46
+ ' . ( ( 'post.php' !== $pagenow ) ? $chart : '' ) . '<span class="imagify-chart-value">' . $data['sizes']['full']['percent'] . '</span>%</strong>' . $output_after;
47
 
48
  // more details section
49
+ if ( 'post.php' !== $pagenow ) {
50
  // new list
51
  $output .= '</ul>';
52
  $output .= '<p class="imagify-datas-more-action"><a href="#imagify-view-details-' . $attachment_id . '" data-close="' . __( 'Close details', 'imagify' ) . '" data-open="' . __( 'View details', 'imagify' ) . '"><span class="the-text">' . __( 'View details', 'imagify' ) . '</span><span class="dashicons dashicons-arrow-down-alt2"></span></a></p>';
64
  }
65
 
66
  // end of list
67
+ $output .= ( 'post.php' !== $pagenow ) ? '</ul>' : '';
68
 
69
  // actions section
70
+ $output .= ( 'post.php' !== $pagenow ) ? '' : $output_before;
71
+ $output .= $reoptimize_output_before;
72
  $output .= $reoptimize_output;
73
+
74
  if ( $attachment->has_backup() ) {
75
+ $args = array(
76
  'attachment_id' => $attachment_id,
77
+ 'context' => $context,
78
  );
79
  $class = ( 'post.php' !== $pagenow ) ? 'button-imagify-restore' : '';
80
  $output .= '<a id="imagify-restore-' . $attachment_id . '" href="' . get_imagify_admin_url( 'restore-upload', $args ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Restoring...', 'imagify' ) . '"><span class="dashicons dashicons-image-rotate"></span>' . __( 'Restore Original', 'imagify' ) . '</a>';
81
+
82
  if ( 'upload.php' != $pagenow ) {
83
  $image = wp_get_attachment_image_src( $attachment_id, 'full' );
84
+
85
  $output .= '<input id="imagify-original-src" type="hidden" value="' . $attachment->get_backup_url() . '">';
86
  $output .= '<input id="imagify-original-size" type="hidden" value="' . $attachment->get_original_size() . '">';
87
  $output .= '<input id="imagify-full-src" type="hidden" value="' . $image[0] . '">';
89
  $output .= '<input id="imagify-full-height" type="hidden" value="' . $image[2] . '">';
90
  }
91
  }
92
+
93
+ $output .= $reoptimize_output_after;
94
+ $output .= ( 'post.php' !== $pagenow ) ? '' : $output_after;
95
 
96
  return $output;
97
  }
107
  */
108
  function get_imagify_attachment_error_text( $attachment, $context = 'wp' ) {
109
  global $pagenow;
110
+
111
  $attachment_id = $attachment->id;
112
  $data = $attachment->get_data();
113
  $output = '';
114
  $args = array(
115
  'attachment_id' => $attachment_id,
116
+ 'context' => $context,
117
  );
118
 
119
  if ( isset( $data['sizes']['full']['success'] ) && ! $data['sizes']['full']['success'] ) {
135
  */
136
  function get_imagify_attachment_reoptimize_link( $attachment, $context = 'wp' ) {
137
  global $pagenow;
138
+
139
  $attachment_id = $attachment->id;
140
  $level = (int) $attachment->get_optimization_level();
141
+ $args = array(
142
  'attachment_id' => $attachment_id,
143
+ 'context' => $context,
144
  );
145
  $output = '';
146
 
147
+ // Stop the process if the API key isn't valid
148
+ if ( ! imagify_valid_key() ) {
149
+ return $output;
150
+ }
151
+
152
+ // Don't display anything if there is no backup or the image has been optimized.
153
+ if ( ! $attachment->has_backup() && ! $attachment->is_already_optimized() ) {
154
+ return $output;
155
+ }
156
+
157
+ $class = ( 'post.php' !== $pagenow ) ? 'button-imagify-manual-override-upload' : '';
158
+
159
+ // Re-optimize to Ultra
160
+ if ( 1 === $level || 0 === $level ) {
161
+ $args['optimization_level'] = 2;
162
+ $output .= '<a href="' . get_imagify_admin_url( 'manual-override-upload', $args ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"><span class="dashicons dashicons-admin-generic"></span>' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), __( 'Ultra', 'imagify' ) ) . '</a>';
163
+ }
164
+
165
+ // Re-optimize to Aggressive
166
+ if ( ( 2 === $level && ! $attachment->is_already_optimized() ) || 0 === $level ) {
167
+ $args['optimization_level'] = 1;
168
+ $output .= '<a href="' . get_imagify_admin_url( 'manual-override-upload', $args ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"><span class="dashicons dashicons-admin-generic"></span>' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), __( 'Aggressive', 'imagify' ) ) . '</a>';
169
+ }
170
+
171
+ // Re-optimize to Normal
172
+ if ( ( 2 === $level || 1 === $level ) && ! $attachment->is_already_optimized() ) {
173
+ $args['optimization_level'] = 0;
174
+ $output .= '<a href="' . get_imagify_admin_url( 'manual-override-upload', $args ) . '" class="' . $class . '" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '"><span class="dashicons dashicons-admin-generic"></span>' . sprintf( __( 'Re-Optimize to %s', 'imagify' ), __( 'Normal', 'imagify' ) ) . '</a>';
175
  }
176
 
177
  return $output;
187
  * @return string The output to print.
188
  */
189
  function get_imagify_media_column_content( $attachment, $context = 'wp' ) {
190
+ $attachment_id = $attachment->id;
191
  $attachment_ext = $attachment->get_extension();
192
  $output = '';
193
+
194
  // Check if the attachment extension is allowed
195
  if ( 'wp' === $context && ! wp_attachment_is_image( $attachment_id ) ) {
196
  $output = sprintf( __( '%s can\'t be optimized', 'imagify' ), strtoupper( $attachment_ext ) );
197
  return $output;
198
  }
199
+
200
  // Check if the API key is valid
201
  if ( ! imagify_valid_key() && ! $attachment->is_optimized() ) {
202
  $output .= __( 'Invalid API key', 'imagify' );
204
  $output .= '<a href="' . get_imagify_admin_url( 'options-general' ) . '">' . __( 'Check your Settings', 'imagify' ) . '</a>';
205
  return $output;
206
  }
207
+
208
  $transient_context = ( 'wp' !== $context ) ? strtolower( $context ) . '-' : '';
209
  $transient_name = 'imagify-' . $transient_context . 'async-in-progress-' . $attachment_id;
210
+
211
  if ( false !== get_transient( $transient_name ) ) {
212
  $output = '<div class="button"><span class="imagify-spinner"></span>' . __( 'Optimizing...', 'imagify' ) . '</div>';
213
  return $output;
217
  if ( ! $attachment->is_optimized() && ! $attachment->has_error() ) {
218
  $args = array(
219
  'attachment_id' => $attachment_id,
220
+ 'context' => $context,
221
  );
222
  $output .= '<a id="imagify-upload-' . $attachment_id . '" href="' . get_imagify_admin_url( 'manual-upload', $args ) . '" class="button-primary button-imagify-manual-upload" data-waiting-label="' . esc_attr__( 'Optimizing...', 'imagify' ) . '">' . __( 'Optimize', 'imagify' ) . '</a>';
223
  return $output;
234
  *
235
  * @since 1.6
236
  * @author Geoffrey
237
+ *
238
  * @todo add only for no-payable users?
239
  */
240
  function get_imagify_new_to_imagify() {
258
 
259
  /**
260
  * Return the formatted price present in pricing tables
261
+ *
262
  * @param float $value the price value
263
  * @return string the markuped price
264
  *
267
  */
268
  function get_imagify_price_table_format( $value ) {
269
  $v = explode( '.', (string) $value );
270
+
271
  return '<span class="imagify-price-big">' . $v[0] . '</span> <span class="imagify-price-mini">.' . ( strlen( $v[1] ) === 1 ? $v[1] . '0' : $v[1] ) . '</span>';
272
  }
273
 
299
  <span class="imagify-numbers-calc"><?php esc_html_e( 'We analysed your images', 'imagify' ); ?></span>
300
  <span class="imagify-numbers-notcalc"><?php esc_html_e( 'We are analysing your images', 'imagify' ); ?></span>
301
  </p>
302
+
303
  <img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>loader-balls.svg" width="77" height="48" alt="<?php esc_attr_e( 'Analyzing', 'imagify' ); ?>" class="imagify-loader">
304
 
305
  <div class="imagify-modal-cols">
306
  <div class="imagify-col">
307
  <p>
308
+ <span class="imagify-border-styled"><?php
309
  printf( _n( 'You have %s image', 'You have %s images', $attachments_number, 'imagify' ), '</span><span class="imagify-big-number">' . $attachments_number . '</span><span class="imagify-border-styled">' ); ?></span>
310
  </p>
311
  </div>
427
  <div class="imagify-submit-line">
428
  <div class="imagify-coupon-section">
429
  <p class="imagify-coupon-text">
430
+
431
  <img src="<?php echo IMAGIFY_ASSETS_IMG_URL; ?>loader-balls.svg" width="60" height="36" alt="<?php esc_attr_e( 'Checking Coupon', 'imagify' ); ?>" class="imagify-coupon-loader">
432
 
433
  <label for="imagify-coupon-code"><?php _e( 'If you have a <strong>coupon code</strong><br> use it there:', 'imagify' ); ?></label>
453
  <p class="imagify-footer-lines"><?php esc_html_e( 'Monthly plans comes with credits which is renewed every months. The billing happens automatically each month or year depending the billing period you choose.', 'imagify' ); ?></p>
454
  </div>
455
  </div><!-- .imagify-pre-checkout-view -->
456
+
457
  <?php
458
 
459
  /**
460
+ *
461
  *
462
  * SECOND MODAL VIEW
463
  *
464
+ *
465
  */
466
 
467
  ?>
484
  <div class="imagify-tabs-contents">
485
 
486
  <div class="imagify-tab-content imagify-current" id="imagify-pricing-tab-monthly" role="tabpanel">
487
+
488
  <div class="imagify-modal-section section-gray">
489
  <p><?php esc_html_e( 'Monthly plans come with credits which is renewed every months. The billing happens automatically each month or year depending the billing period you choose.', 'imagify' ); ?></p>
490
  </div>
501
 
502
 
503
  <div class="imagify-pricing-table imagify-month-selected">
504
+
505
  <script type="text/template" id="imagify-offer-monthly-template"><div class="imagify-offer-line imagify-offer-monthlies imagify-flex-table">
506
  <div class="imagify-col-details">
507
+ <p class="imagify-label">
508
  <span class="imagify-the-offer">
509
  <span class="imagify-offer-size"></span>
510
  <span class="imagify-offer-by"><?php esc_html_e( '/month', 'imagify' ); ?></span>
533
  </div>
534
  </div><!-- .imagify-offer-line --></script>
535
  </div><!-- .imagify-pricing-table -->
536
+
537
  <div class="imagify-cols">
538
  <div class="imagify-col imagify-txt-start">
539
  <p class="imagify-special-needs">
555
  <div class="imagify-pricing-table imagify-month-selected">
556
  <script type="text/template" id="imagify-offer-onetime-template"><div class="imagify-offer-line imagify-flex-table imagify-offer-onetimes">
557
  <div class="imagify-col-details">
558
+ <p class="imagify-label">
559
  <span class="imagify-the-offer">
560
  <span class="imagify-offer-size"></span>
561
  </span>
585
  <?php
586
 
587
  /**
588
+ *
589
  *
590
  * THIRD MODAL VIEW
591
  *
592
+ *
593
  */
594
 
595
  ?>
601
  <iframe data-imagify-api="<?php echo $imagify_api_key; ?>" id="imagify-payment-iframe" data-src="<?php echo IMAGIFY_PAYMENT_URL; ?>" name="imagify-payment-iframe" src="" frameborder="0"></iframe>
602
 
603
  </div><!-- .imagify-modal-views -->
604
+
605
  <?php
606
 
607
  /**
608
+ *
609
  *
610
  * Succes view
611
  *
612
+ *
613
  */
614
 
615
  ?>
676
 
677
  /**
678
  * Print the discount banner used inside Payment Modal
679
+ *
680
  * @return void
681
  * @author Geoffrey Crofte
682
  * @since 1.6.3
692
  </div>
693
 
694
  <?php
695
+ }
languages/imagify-fr_FR.mo CHANGED
Binary file
languages/imagify-fr_FR.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Imagify\n"
4
- "POT-Creation-Date: 2016-12-06 18:45+0100\n"
5
- "PO-Revision-Date: 2016-12-06 18:46+0100\n"
6
  "Last-Translator: Rémy Perona <remperona@gmail.com>\n"
7
  "Language-Team: \n"
8
  "Language: fr_FR\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.8.6\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: imagify.php\n"
15
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
@@ -466,7 +466,7 @@ msgid ""
466
  "%1$sCongratulations%2$s, you have optimized %1$s%3$d images%2$s and improved "
467
  "your website's speed by reducing your images size."
468
  msgstr ""
469
- "%1$sFélicitations%2$s ! Vous avez optimisé %1$s%3$d images%2$s et améliorez le "
470
  "temps de chargement de votre site en réduisant le poids de vos images."
471
 
472
  #: inc/admin/ui/notices.php:365 inc/admin/ui/options.php:59
@@ -693,7 +693,7 @@ msgstr ""
693
  "baisse de qualité sur vos images, nous vous recommandons ce niveau."
694
 
695
  #: inc/admin/ui/options.php:357 inc/admin/ui/options.php:479
696
- #: inc/functions/admin-ui.php:619 inc/functions/i18n.php:64
697
  msgid "Close"
698
  msgstr "Fermer"
699
 
@@ -890,7 +890,7 @@ msgid "/month"
890
  msgstr "/mois"
891
 
892
  #: inc/functions/admin-ui.php:351 inc/functions/admin-ui.php:399
893
- #: inc/functions/admin-ui.php:505 inc/functions/admin-ui.php:557
894
  #, php-format
895
  msgid "approx: %s images"
896
  msgstr "approx&nbsp;: %s images"
@@ -964,11 +964,11 @@ msgstr ""
964
  "facturation arrive automatiquement tous les mois ou années dépendamment de "
965
  "votre choix de période de facturation."
966
 
967
- #: inc/functions/admin-ui.php:517 inc/functions/admin-ui.php:565
968
  msgid "we recommend for you"
969
  msgstr "nous vous recommandons"
970
 
971
- #: inc/functions/admin-ui.php:525 inc/functions/admin-ui.php:569
972
  msgid "Choose plan"
973
  msgstr "Choisir ce plan"
974
 
@@ -994,28 +994,28 @@ msgstr ""
994
  "qui ont besoin d’être optimisées. Vous pouvez l’utiliser pour une optimisation "
995
  "en masse de vos images passées. Vous ne paierez qu’une fois."
996
 
997
- #: inc/functions/admin-ui.php:614
998
  msgid "Thank you for being awesome!"
999
  msgstr "Merci à vous d’être aussi fabuleux&nbsp;!"
1000
 
1001
- #: inc/functions/admin-ui.php:626
1002
  msgid "What do our user think about Imagify"
1003
  msgstr "Ce que nos utilisateurs pensent d’Imagify"
1004
 
1005
- #: inc/functions/admin-ui.php:660
1006
  msgid "Secure Credit Card Payment"
1007
  msgstr "Paiement par carte sécurisé"
1008
 
1009
- #: inc/functions/admin-ui.php:661
1010
  msgid "This is secure 128-bits SSL encrypted payment"
1011
  msgstr "Paiement sécurisé par cryptage SSL 128-bits"
1012
 
1013
- #: inc/functions/admin-ui.php:683
1014
  #, php-format
1015
  msgid "%s OFF on all the subscriptions"
1016
  msgstr "%s de remise sur tous les abonnements"
1017
 
1018
- #: inc/functions/admin-ui.php:685
1019
  #, php-format
1020
  msgid "Special Offer<br><strong>Until %s</strong>"
1021
  msgstr "Offre spéciale<br><strong>Jusqu’au %s</strong>"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Imagify\n"
4
+ "POT-Creation-Date: 2017-04-05 12:25+0200\n"
5
+ "PO-Revision-Date: 2017-04-05 12:25+0200\n"
6
  "Last-Translator: Rémy Perona <remperona@gmail.com>\n"
7
  "Language-Team: \n"
8
  "Language: fr_FR\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.0\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "X-Poedit-WPHeader: imagify.php\n"
15
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
466
  "%1$sCongratulations%2$s, you have optimized %1$s%3$d images%2$s and improved "
467
  "your website's speed by reducing your images size."
468
  msgstr ""
469
+ "%1$sFélicitations%2$s ! Vous avez optimisé %1$s%3$d images%2$s et amélioré le "
470
  "temps de chargement de votre site en réduisant le poids de vos images."
471
 
472
  #: inc/admin/ui/notices.php:365 inc/admin/ui/options.php:59
693
  "baisse de qualité sur vos images, nous vous recommandons ce niveau."
694
 
695
  #: inc/admin/ui/options.php:357 inc/admin/ui/options.php:479
696
+ #: inc/functions/admin-ui.php:617 inc/functions/i18n.php:64
697
  msgid "Close"
698
  msgstr "Fermer"
699
 
890
  msgstr "/mois"
891
 
892
  #: inc/functions/admin-ui.php:351 inc/functions/admin-ui.php:399
893
+ #: inc/functions/admin-ui.php:505 inc/functions/admin-ui.php:555
894
  #, php-format
895
  msgid "approx: %s images"
896
  msgstr "approx&nbsp;: %s images"
964
  "facturation arrive automatiquement tous les mois ou années dépendamment de "
965
  "votre choix de période de facturation."
966
 
967
+ #: inc/functions/admin-ui.php:517 inc/functions/admin-ui.php:563
968
  msgid "we recommend for you"
969
  msgstr "nous vous recommandons"
970
 
971
+ #: inc/functions/admin-ui.php:525 inc/functions/admin-ui.php:567
972
  msgid "Choose plan"
973
  msgstr "Choisir ce plan"
974
 
994
  "qui ont besoin d’être optimisées. Vous pouvez l’utiliser pour une optimisation "
995
  "en masse de vos images passées. Vous ne paierez qu’une fois."
996
 
997
+ #: inc/functions/admin-ui.php:612
998
  msgid "Thank you for being awesome!"
999
  msgstr "Merci à vous d’être aussi fabuleux&nbsp;!"
1000
 
1001
+ #: inc/functions/admin-ui.php:624
1002
  msgid "What do our user think about Imagify"
1003
  msgstr "Ce que nos utilisateurs pensent d’Imagify"
1004
 
1005
+ #: inc/functions/admin-ui.php:658
1006
  msgid "Secure Credit Card Payment"
1007
  msgstr "Paiement par carte sécurisé"
1008
 
1009
+ #: inc/functions/admin-ui.php:659
1010
  msgid "This is secure 128-bits SSL encrypted payment"
1011
  msgstr "Paiement sécurisé par cryptage SSL 128-bits"
1012
 
1013
+ #: inc/functions/admin-ui.php:681
1014
  #, php-format
1015
  msgid "%s OFF on all the subscriptions"
1016
  msgstr "%s de remise sur tous les abonnements"
1017
 
1018
+ #: inc/functions/admin-ui.php:683
1019
  #, php-format
1020
  msgid "Special Offer<br><strong>Until %s</strong>"
1021
  msgstr "Offre spéciale<br><strong>Jusqu’au %s</strong>"
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: wp_media
3
  Tags: compress image, images, performance, optimization, photos, upload, resize, gif, png, jpg, reduce image size, retina
4
  Requires at least: 3.7.0
5
- Tested up to: 4.7
6
- Stable tag: 1.6.3
7
 
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -14,31 +14,31 @@ Dramatically reduce image file sizes without losing quality, make your website l
14
 
15
  Speed up your website with lighter images without losing quality.
16
 
17
- Imagify is the most advanced image compression tool, you can now use this power directly in WordPress.
18
  After enabling it all your images including thumbnails and retina images from WP Retina x2 will be automatically optimized on the fly when you will add in into WordPress.
19
 
20
  WooCommerce and NextGen Gallery compatible.
21
-
22
  = What is Image Compression? =
23
 
24
  Learn more about image compression, check that: <a href="https://imagify.io/images-compression">https://imagify.io/images-compression</a>
25
 
26
  = Why use Imagify to optimize you images? =
27
 
28
- You already have a lots of unoptimized images? Not a problem, you will love the Bulk Optimizer to optimize all your existing images in one click.
29
-
30
- Imagify can directly resize your images, **you won't have to lose time anymore on resizing your images before uploading them**.
31
-
32
- Three level of compression are available:
33
-
34
- - Normal, a lossless compression algorithm. The image quality won't be altered at all.
35
- - Agressive, a lossy compression algorithm. Stronger compression with a tiny loss of quality most of the time this is not even noticeable at all.
36
- - Ultra, our strongest compression method using a lossy algorithm.
37
-
38
  With the backup option, you can change your mind whenever you want by restoring your images to their original version or optimize them to another compression level.
39
 
40
  = What our users think of Imagify? =
41
-
42
  > "Imagify is an awesome tool that is powerful & easy to use. It's fast, rivals and surpasses other established plugins/software. Awesome!" — [Simon Harper](https://twitter.com/SRHDesign/status/663758140505235456)
43
  >
44
  > "If you want to "squeeze" your images as much as possible and "trim out" your website on the highest professional level... Imagify" — [Ivica Delic](https://twitter.com/Free_LanceTools/status/685503950909476865)
@@ -51,14 +51,14 @@ With the backup option, you can change your mind whenever you want by restoring
51
  You can optimize for free 25MB of images (about 250 images) every month and you will receive a 25MB bonus upon registration.
52
 
53
  Need more? Have a look at our plans: <a href="https://imagify.io/pricing">https://imagify.io/pricing</a>
54
-
55
  = What's next? =
56
 
57
  Have a look at our upcoming features by following our development roadmap: <a href="https://trello.com/b/3Q8ZnSN6/imagify-roadmap">https://trello.com/b/3Q8ZnSN6/imagify-roadmap</a>
58
 
59
  = Who we are? =
60
-
61
- We are <a href="http://wp-media.me">WP Media</a>, the startup behind WP Rocket the best caching plugin for WordPress.
62
 
63
  Our mission is to improve the web, we are making it faster with <a href="http://wp-rocket.me/">WP Rocket</a> we want to make it lighter with Imagify.
64
 
@@ -136,6 +136,11 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
136
  3. Media Page
137
 
138
  == Changelog ==
 
 
 
 
 
139
  = 1.6.3 =
140
  * Improvement
141
  * The discount is now automatically applied in when you buy from the plugin and a promotion is active
@@ -143,14 +148,14 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
143
  = 1.6.2 =
144
  * Bug Fix
145
  * Correctly display the modal when clicking on the plan suggestion button on bulk optimisation page
146
-
147
  = 1.6.1 =
148
  * Bug Fix
149
  * Better offer suggestion when your medias library is bigger than 3GB
150
 
151
  = 1.6 =
152
  * NEW Features:
153
- * Knowing how many MB/GB you need to optimize your existing and future images is complicated. We love to make things easiers, so Imagify will do it and advise you the best plan.
154
  * You can now buy all the plans without leaving your WordPress administration
155
  * Improvement
156
  * Some styles fixed in the interface
@@ -158,7 +163,7 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
158
  = 1.5.10 =
159
  * Improvement
160
  * Set to 1 the Bulk buffer size when there are more than 10 thumbnails to avoid "Unkown error" on the Bulk Optimization
161
-
162
  = 1.5.9 =
163
  * Bug fix
164
  * Don't delete the thumbnail when the maximum file size is set to one of the thumbnail size
@@ -181,12 +186,12 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
181
  = 1.5.5 =
182
  * Bug Fix
183
  * Fix issue with "original_size" at 0 in "_imagify_data" to be able to re-optimize an image with a "Forbidden" error.
184
-
185
  = 1.5.4 =
186
  * Improvement
187
  * Increase to 4 the number of parallel queries during a bulk optimization
188
  * Don't display Intercom chat if the user turned off the option in the web app
189
-
190
  = 1.5.3 =
191
  * Regression Fix
192
  * Display the Original Filesize in "View Details" section
@@ -195,13 +200,13 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
195
  * Bug Fix
196
  * Fix JS error: Uncaught ReferenceError: imagify is not defined in /assets/options.min.js
197
  * Don't show "Optimize" button during optimizing process in "Edit Media" screen
198
-
199
  = 1.5.1 =
200
  * Bug Fix
201
  * Thumbnail sizes in settings page aren't reset anymore on plugin update
202
  * Fix PHP Warning: Cannot unset offset in a non-array variable in /inc/functions/admin-stats.php on line 23
203
  * Fix PHP Warning: Invalid argument supplied for foreach() in /inc/functions/admin-stats.php on line 233
204
-
205
  = 1.5 =
206
  * NEW Features:
207
  * NextGen Gallery compatibility - Optimize all your images uploaded with NextGen Gallery
@@ -221,7 +226,7 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
221
  = 1.4.5 =
222
  * Interface
223
  * Bulk Optimization: optimize all SQL queries and improve by 65% the process time \o/
224
- * Misc
225
  * Chart.js library updated
226
  * Media List JS notice removed
227
 
@@ -249,7 +254,7 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
249
  * Bug Fix
250
  * Fix PHP Notice: Undefined index original_size in /inc/functions/admin-stats.php on line 185
251
  * Fix PHP Notice: Undefined index optimized_size in /inc/functions/admin-stats.php on line 186
252
-
253
  = 1.4.1 =
254
  * Interface
255
  * Medias: better comparison for big portrait images
@@ -277,9 +282,9 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
277
  * Add a notice message if we can't get all unoptimized images during the Bulk Optimization process
278
  * Fix PHP Warning: set_time_limit(): Cannot set time limit in safe mode in ../inc/admin/ajax.php on line 137
279
  * Details about compressed images in modal media box are now closed by default
280
- * Regression Fix
281
  * Get all attachments with the message "You've consumed all your data" during the Bulk Optimization process to be able to optimize them
282
-
283
  = 1.3.5.2 =
284
  * Regression Fix
285
  * Check mark displayed better on certain settings pages
@@ -294,16 +299,16 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
294
  = 1.3.3 =
295
  * Bug Fix
296
  * Fixed behavior in multisite networks where Imagify options would not get saved when the plugin wasn't network-activated, but only activated for specific sites within the network.
297
-
298
  = 1.3.2 =
299
  * NEW: Add Spanish translation
300
  * Bug Fix
301
  * Avoid lack of performance in the WordPress administration if the Imagify's servers are down.
302
-
303
  = 1.3.1 =
304
  * Bug Fix
305
  * Remove a notice message which causes a lack of performance in the administration. (thanks Kevin Gauthier to warn us)
306
-
307
  = 1.3 =
308
  * NEW: Add GIF support
309
  * NEW option: You can now decide to keep EXIF data on your images
@@ -315,12 +320,12 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
315
  = 1.2.3 =
316
  * Improvement
317
  * Use AJAX to display the quota in the admin bar to avoid a call to our API on each pages.
318
-
319
  = 1.2.2 =
320
  * Bug Fix
321
  * Bulk Optimization: Fix issue when the backup option isn't activated. The compression level applied was "Normal" instead the one saved in the settings.
322
  * Bulk Optimization: Don't try to re-optimize an image already optimized which has the same compression level than the one saved in the settings.
323
-
324
  = 1.2.1 =
325
  * Regression Fix
326
  * Fix the Bulk Optimization issue when you never optimized any images and avoid the message "All your images have been optimized by Imagify. Congratulations!".
@@ -365,7 +370,7 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
365
 
366
  = 1.1.3 =
367
  * Bug Fix
368
- * Fix PHP Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in ../inc/api/imagify.php on line 218
369
 
370
  = 1.1.2 =
371
  * Regression Fix
@@ -373,7 +378,7 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
373
  * Fix PHP Warning: Illegal string offset 'sizes' in ../inc/classes/class-attachment.php on line 347
374
  * Fix PHP Notice: Uninitialized string offset: 0 in ../inc/classes/class-attachment.php on line 347
375
  * Fix PHP Warning: Illegal string offset 'file' in ../inc/classes/class-attachment.php on line 410
376
-
377
  = 1.1.1 =
378
  * Interface
379
  * Add a notice on the Bulk Optimization & Imagify Settings page when the monthly free quota is consumed
2
  Contributors: wp_media
3
  Tags: compress image, images, performance, optimization, photos, upload, resize, gif, png, jpg, reduce image size, retina
4
  Requires at least: 3.7.0
5
+ Tested up to: 4.7.3
6
+ Stable tag: 1.6.4
7
 
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
15
  Speed up your website with lighter images without losing quality.
16
 
17
+ Imagify is the most advanced image compression tool, you can now use this power directly in WordPress.
18
  After enabling it all your images including thumbnails and retina images from WP Retina x2 will be automatically optimized on the fly when you will add in into WordPress.
19
 
20
  WooCommerce and NextGen Gallery compatible.
21
+
22
  = What is Image Compression? =
23
 
24
  Learn more about image compression, check that: <a href="https://imagify.io/images-compression">https://imagify.io/images-compression</a>
25
 
26
  = Why use Imagify to optimize you images? =
27
 
28
+ You already have a lots of unoptimized images? Not a problem, you will love the Bulk Optimizer to optimize all your existing images in one click.
29
+
30
+ Imagify can directly resize your images, **you won't have to lose time anymore on resizing your images before uploading them**.
31
+
32
+ Three level of compression are available:
33
+
34
+ - Normal, a lossless compression algorithm. The image quality won't be altered at all.
35
+ - Agressive, a lossy compression algorithm. Stronger compression with a tiny loss of quality most of the time this is not even noticeable at all.
36
+ - Ultra, our strongest compression method using a lossy algorithm.
37
+
38
  With the backup option, you can change your mind whenever you want by restoring your images to their original version or optimize them to another compression level.
39
 
40
  = What our users think of Imagify? =
41
+
42
  > "Imagify is an awesome tool that is powerful & easy to use. It's fast, rivals and surpasses other established plugins/software. Awesome!" — [Simon Harper](https://twitter.com/SRHDesign/status/663758140505235456)
43
  >
44
  > "If you want to "squeeze" your images as much as possible and "trim out" your website on the highest professional level... Imagify" — [Ivica Delic](https://twitter.com/Free_LanceTools/status/685503950909476865)
51
  You can optimize for free 25MB of images (about 250 images) every month and you will receive a 25MB bonus upon registration.
52
 
53
  Need more? Have a look at our plans: <a href="https://imagify.io/pricing">https://imagify.io/pricing</a>
54
+
55
  = What's next? =
56
 
57
  Have a look at our upcoming features by following our development roadmap: <a href="https://trello.com/b/3Q8ZnSN6/imagify-roadmap">https://trello.com/b/3Q8ZnSN6/imagify-roadmap</a>
58
 
59
  = Who we are? =
60
+
61
+ We are <a href="http://wp-media.me">WP Media</a>, the startup behind WP Rocket the best caching plugin for WordPress.
62
 
63
  Our mission is to improve the web, we are making it faster with <a href="http://wp-rocket.me/">WP Rocket</a> we want to make it lighter with Imagify.
64
 
136
  3. Media Page
137
 
138
  == Changelog ==
139
+ = 1.6.4 =
140
+ * Improvement
141
+ * Provide a link to optimize in higher level when an image is already optimized.
142
+ * Add a dedicated message for 413 HTTP error when the image is too big to be uploaded on our servers.
143
+
144
  = 1.6.3 =
145
  * Improvement
146
  * The discount is now automatically applied in when you buy from the plugin and a promotion is active
148
  = 1.6.2 =
149
  * Bug Fix
150
  * Correctly display the modal when clicking on the plan suggestion button on bulk optimisation page
151
+
152
  = 1.6.1 =
153
  * Bug Fix
154
  * Better offer suggestion when your medias library is bigger than 3GB
155
 
156
  = 1.6 =
157
  * NEW Features:
158
+ * Knowing how many MB/GB you need to optimize your existing and future images is complicated. We love to make things easiers, so Imagify will do it and advise you the best plan.
159
  * You can now buy all the plans without leaving your WordPress administration
160
  * Improvement
161
  * Some styles fixed in the interface
163
  = 1.5.10 =
164
  * Improvement
165
  * Set to 1 the Bulk buffer size when there are more than 10 thumbnails to avoid "Unkown error" on the Bulk Optimization
166
+
167
  = 1.5.9 =
168
  * Bug fix
169
  * Don't delete the thumbnail when the maximum file size is set to one of the thumbnail size
186
  = 1.5.5 =
187
  * Bug Fix
188
  * Fix issue with "original_size" at 0 in "_imagify_data" to be able to re-optimize an image with a "Forbidden" error.
189
+
190
  = 1.5.4 =
191
  * Improvement
192
  * Increase to 4 the number of parallel queries during a bulk optimization
193
  * Don't display Intercom chat if the user turned off the option in the web app
194
+
195
  = 1.5.3 =
196
  * Regression Fix
197
  * Display the Original Filesize in "View Details" section
200
  * Bug Fix
201
  * Fix JS error: Uncaught ReferenceError: imagify is not defined in /assets/options.min.js
202
  * Don't show "Optimize" button during optimizing process in "Edit Media" screen
203
+
204
  = 1.5.1 =
205
  * Bug Fix
206
  * Thumbnail sizes in settings page aren't reset anymore on plugin update
207
  * Fix PHP Warning: Cannot unset offset in a non-array variable in /inc/functions/admin-stats.php on line 23
208
  * Fix PHP Warning: Invalid argument supplied for foreach() in /inc/functions/admin-stats.php on line 233
209
+
210
  = 1.5 =
211
  * NEW Features:
212
  * NextGen Gallery compatibility - Optimize all your images uploaded with NextGen Gallery
226
  = 1.4.5 =
227
  * Interface
228
  * Bulk Optimization: optimize all SQL queries and improve by 65% the process time \o/
229
+ * Misc
230
  * Chart.js library updated
231
  * Media List JS notice removed
232
 
254
  * Bug Fix
255
  * Fix PHP Notice: Undefined index original_size in /inc/functions/admin-stats.php on line 185
256
  * Fix PHP Notice: Undefined index optimized_size in /inc/functions/admin-stats.php on line 186
257
+
258
  = 1.4.1 =
259
  * Interface
260
  * Medias: better comparison for big portrait images
282
  * Add a notice message if we can't get all unoptimized images during the Bulk Optimization process
283
  * Fix PHP Warning: set_time_limit(): Cannot set time limit in safe mode in ../inc/admin/ajax.php on line 137
284
  * Details about compressed images in modal media box are now closed by default
285
+ * Regression Fix
286
  * Get all attachments with the message "You've consumed all your data" during the Bulk Optimization process to be able to optimize them
287
+
288
  = 1.3.5.2 =
289
  * Regression Fix
290
  * Check mark displayed better on certain settings pages
299
  = 1.3.3 =
300
  * Bug Fix
301
  * Fixed behavior in multisite networks where Imagify options would not get saved when the plugin wasn't network-activated, but only activated for specific sites within the network.
302
+
303
  = 1.3.2 =
304
  * NEW: Add Spanish translation
305
  * Bug Fix
306
  * Avoid lack of performance in the WordPress administration if the Imagify's servers are down.
307
+
308
  = 1.3.1 =
309
  * Bug Fix
310
  * Remove a notice message which causes a lack of performance in the administration. (thanks Kevin Gauthier to warn us)
311
+
312
  = 1.3 =
313
  * NEW: Add GIF support
314
  * NEW option: You can now decide to keep EXIF data on your images
320
  = 1.2.3 =
321
  * Improvement
322
  * Use AJAX to display the quota in the admin bar to avoid a call to our API on each pages.
323
+
324
  = 1.2.2 =
325
  * Bug Fix
326
  * Bulk Optimization: Fix issue when the backup option isn't activated. The compression level applied was "Normal" instead the one saved in the settings.
327
  * Bulk Optimization: Don't try to re-optimize an image already optimized which has the same compression level than the one saved in the settings.
328
+
329
  = 1.2.1 =
330
  * Regression Fix
331
  * Fix the Bulk Optimization issue when you never optimized any images and avoid the message "All your images have been optimized by Imagify. Congratulations!".
370
 
371
  = 1.1.3 =
372
  * Bug Fix
373
+ * Fix PHP Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in ../inc/api/imagify.php on line 218
374
 
375
  = 1.1.2 =
376
  * Regression Fix
378
  * Fix PHP Warning: Illegal string offset 'sizes' in ../inc/classes/class-attachment.php on line 347
379
  * Fix PHP Notice: Uninitialized string offset: 0 in ../inc/classes/class-attachment.php on line 347
380
  * Fix PHP Warning: Illegal string offset 'file' in ../inc/classes/class-attachment.php on line 410
381
+
382
  = 1.1.1 =
383
  * Interface
384
  * Add a notice on the Bulk Optimization & Imagify Settings page when the monthly free quota is consumed