Imagify Image Optimizer - Version 1.5.8

Version Description

  • Regression fix
    • Check if the backup option is active before doing a backup when an image is resized
Download this release

Release Info

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

Code changes from version 1.5.7 to 1.5.8

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.5.7
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.5.7' );
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.5.8
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.5.8' );
21
  define( 'IMAGIFY_SLUG' , 'imagify' );
22
  define( 'IMAGIFY_SETTINGS_SLUG' , IMAGIFY_SLUG . '_settings' );
23
  define( 'IMAGIFY_WEB_MAIN' , 'https://imagify.io' );
inc/3rd-party/nextgen-gallery/inc/classes/class-attachment.php CHANGED
@@ -279,14 +279,16 @@ class Imagify_NGG_Attachment extends Imagify_Abstract_Attachment {
279
  $resized_attachment_path = $this->resize( $attachment_path, $attachment_size, $resize_width );
280
 
281
  if ( ! is_wp_error( $resized_attachment_path ) ) {
282
- $backup_path = get_imagify_attachment_backup_path( $attachment_path );
283
- $backup_path_info = pathinfo( $backup_path );
 
284
 
285
- wp_mkdir_p( $backup_path_info['dirname'] );
286
 
287
- // TO DO - check and send a error message if the backup can't be created
288
- @copy( $attachment_path, $backup_path );
289
- imagify_chmod_file( $backup_path );
 
290
 
291
  @rename( $resized_attachment_path, $attachment_path );
292
  imagify_chmod_file( $attachment_path );
279
  $resized_attachment_path = $this->resize( $attachment_path, $attachment_size, $resize_width );
280
 
281
  if ( ! is_wp_error( $resized_attachment_path ) ) {
282
+ if ( get_imagify_option( 'backup', false ) ) {
283
+ $backup_path = get_imagify_attachment_backup_path( $attachment_path );
284
+ $backup_path_info = pathinfo( $backup_path );
285
 
286
+ wp_mkdir_p( $backup_path_info['dirname'] );
287
 
288
+ // TO DO - check and send a error message if the backup can't be created
289
+ @copy( $attachment_path, $backup_path );
290
+ imagify_chmod_file( $backup_path );
291
+ }
292
 
293
  @rename( $resized_attachment_path, $attachment_path );
294
  imagify_chmod_file( $attachment_path );
inc/classes/class-attachment.php CHANGED
@@ -240,14 +240,16 @@ class Imagify_Attachment extends Imagify_Abstract_Attachment {
240
  $resized_attachment_path = $this->resize( $attachment_path, $attachment_size, $resize_width );
241
 
242
  if ( ! is_wp_error( $resized_attachment_path ) ) {
243
- $backup_path = get_imagify_attachment_backup_path( $attachment_path );
244
- $backup_path_info = pathinfo( $backup_path );
 
245
 
246
- wp_mkdir_p( $backup_path_info['dirname'] );
247
 
248
- // TO DO - check and send a error message if the backup can't be created
249
- @copy( $attachment_path, $backup_path );
250
- imagify_chmod_file( $backup_path );
 
251
 
252
  @rename( $resized_attachment_path, $attachment_path );
253
  imagify_chmod_file( $attachment_path );
240
  $resized_attachment_path = $this->resize( $attachment_path, $attachment_size, $resize_width );
241
 
242
  if ( ! is_wp_error( $resized_attachment_path ) ) {
243
+ if ( get_imagify_option( 'backup', false ) ) {
244
+ $backup_path = get_imagify_attachment_backup_path( $attachment_path );
245
+ $backup_path_info = pathinfo( $backup_path );
246
 
247
+ wp_mkdir_p( $backup_path_info['dirname'] );
248
 
249
+ // TO DO - check and send a error message if the backup can't be created
250
+ @copy( $attachment_path, $backup_path );
251
+ imagify_chmod_file( $backup_path );
252
+ }
253
 
254
  @rename( $resized_attachment_path, $attachment_path );
255
  imagify_chmod_file( $attachment_path );
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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.6
6
- Stable tag: 1.5.7
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -135,6 +135,10 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
135
  3. Media Page
136
 
137
  == Changelog ==
 
 
 
 
138
  = 1.5.7 =
139
  * Improvement
140
  * Resize images bigger than the maximum width defined in the settings using WP Image Editor instead of Imagify API
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.6
6
+ Stable tag: 1.5.8
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
135
  3. Media Page
136
 
137
  == Changelog ==
138
+ = 1.5.8 =
139
+ * Regression fix
140
+ * Check if the backup option is active before doing a backup when an image is resized
141
+
142
  = 1.5.7 =
143
  * Improvement
144
  * Resize images bigger than the maximum width defined in the settings using WP Image Editor instead of Imagify API