Imagify Image Optimizer - Version 1.5.3

Version Description

  • Regression Fix
    • Display the Original Filesize in "View Details" section
Download this release

Release Info

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

Code changes from version 1.5.2.1 to 1.5.3

assets/js/bulk.js CHANGED
@@ -134,6 +134,7 @@ jQuery(function($){
134
  text: imagifyBulk.labels.waitText,
135
  closeOnConfirm: false,
136
  showConfirmButton: false,
 
137
  imageUrl: imagifyBulk.labels.waitImageUrl
138
  });
139
 
134
  text: imagifyBulk.labels.waitText,
135
  closeOnConfirm: false,
136
  showConfirmButton: false,
137
+ html: true,
138
  imageUrl: imagifyBulk.labels.waitImageUrl
139
  });
140
 
assets/js/bulk.min.js CHANGED
@@ -4,7 +4,7 @@ label:imagifyBulk.labels.overviewChartLabels.optimized},{value:imagifyBulk.label
4
  tooltipTemplate:"<%= value %>"});overviewLegend='<ul class="imagify-doughnut-legend">';b(e).each(function(b){overviewLegend+='<li><span style="background-color:'+e[b].color+'"></span>'+e[b].label+"</li>"});overviewLegend+="</ul>";document.getElementById("imagify-overview-chart-legend").innerHTML=overviewLegend}b(document).on("heartbeat-send",function(b,a){a.imagify_heartbeat=imagifyBulk.heartbeat_id});b(document).on("heartbeat-tick",function(c,a){a.imagify_bulk_data&&(a=a.imagify_bulk_data,b("#imagify-overview-chart-percent").html(a.optimized_attachments_percent+
5
  "<span>%</span>"),b(".imagify-total-percent").html(a.optimized_attachments_percent+"%"),b(".imagify-unconsumed-percent").html(a.unconsumed_quota+"%"),b(".imagify-unconsumed-bar").animate({width:a.unconsumed_quota+"%"}),b("#imagify-total-optimized-attachments").html(a.already_optimized_attachments),b("#imagify-original-bar").find(".imagify-barnb").html(a.original_human),b("#imagify-optimized-bar").animate({width:a.optimized_percent+"%"}),b("#imagify-optimized-bar").find(".imagify-barnb").html(a.optimized_human),
6
  b("#imagify-total-optimized-attachments-pct").html(a.optimized_percent+"%"),d.segments[0].value=a.unoptimized_attachments,d.segments[1].value=a.optimized_attachments,d.segments[2].value=a.errors_attachments,d.update())});b("#imagify-simulate-bulk-action").click(function(c){c.preventDefault();b("#imagify-bulk-action").trigger("click")});b("#imagify-bulk-action").click(function(){var c=b(this),a=b('[name="optimization_level"]:checked').val();"undefined"===typeof a&&(a=-1);if(c.attr("disabled"))return!1;
7
- c.attr("disabled","disabled");c.find(".dashicons").addClass("rotate");confirmMessage=function(){return imagifyBulk.labels.processing};b(window).on("beforeunload",confirmMessage);swal({title:imagifyBulk.labels.waitTitle,text:imagifyBulk.labels.waitText,closeOnConfirm:!1,showConfirmButton:!1,imageUrl:imagifyBulk.labels.waitImageUrl});b.get(ajaxurl+k+"action="+imagifyBulk.ajax_action+"&optimization_level="+a+"&imagifybulkuploadnonce="+b("#imagifybulkuploadnonce").val()).done(function(a){if(a.success){swal.close();
8
  a={lib:ajaxurl+k+"action=imagify_bulk_upload&imagifybulkuploadnonce="+b("#imagifybulkuploadnonce").val(),images:a.data,context:imagifyBulk.ajax_context};var e=b(".imagify-bulk-table table tbody"),d=0,f=0,g=0,h=0;b(".imagify-row-progress").slideDown();b(".imagify-no-uploaded-yet, .imagify-row-complete").hide(200);Optimizer=new ImagifyGulp(a);Optimizer.before(function(b){e.find(".imagify-row-progress").after('<tr id="attachment-'+b.id+'"><td class="imagify-cell-filename"><span class="imagiuploaded"><img src="'+
9
  b.thumbnail+'"/>"</span><span class="imagifilename">'+b.filename+'</span></td><td class="imagify-cell-status"><span class="imagistatus status-compressing"><span class="dashicons dashicons-admin-generic rotate"></span>Compressing<span></span></span></td><td class="imagify-cell-original"></td><td class="imagify-cell-optimized"></td><td class="imagify-cell-percentage"></td><td class="imagify-cell-thumbnails"></td><td class="imagify-cell-savings"></td></tr>')}).each(function(a){var c=b("#imagify-progress-bar");
10
  c.css({width:a.progress+"%"});c.find(".percent").html(a.progress+"%");a.success?(b("#attachment-"+a.image+" .imagify-cell-status").html('<span class="imagistatus status-complete"><span class="dashicons dashicons-yes"></span>Complete</span>'),b("#attachment-"+a.image+" .imagify-cell-original").html(a.original_size_human),b("#attachment-"+a.image+" .imagify-cell-optimized").html(a.new_size_human),b("#attachment-"+a.image+" .imagify-cell-percentage").html('<span class="imagify-chart"><span class="imagify-chart-container"><canvas height="18" width="18" id="imagify-consumption-chart" style="width: 18px; height: 18px;"></canvas></span></span><span class="imagipercent">'+
4
  tooltipTemplate:"<%= value %>"});overviewLegend='<ul class="imagify-doughnut-legend">';b(e).each(function(b){overviewLegend+='<li><span style="background-color:'+e[b].color+'"></span>'+e[b].label+"</li>"});overviewLegend+="</ul>";document.getElementById("imagify-overview-chart-legend").innerHTML=overviewLegend}b(document).on("heartbeat-send",function(b,a){a.imagify_heartbeat=imagifyBulk.heartbeat_id});b(document).on("heartbeat-tick",function(c,a){a.imagify_bulk_data&&(a=a.imagify_bulk_data,b("#imagify-overview-chart-percent").html(a.optimized_attachments_percent+
5
  "<span>%</span>"),b(".imagify-total-percent").html(a.optimized_attachments_percent+"%"),b(".imagify-unconsumed-percent").html(a.unconsumed_quota+"%"),b(".imagify-unconsumed-bar").animate({width:a.unconsumed_quota+"%"}),b("#imagify-total-optimized-attachments").html(a.already_optimized_attachments),b("#imagify-original-bar").find(".imagify-barnb").html(a.original_human),b("#imagify-optimized-bar").animate({width:a.optimized_percent+"%"}),b("#imagify-optimized-bar").find(".imagify-barnb").html(a.optimized_human),
6
  b("#imagify-total-optimized-attachments-pct").html(a.optimized_percent+"%"),d.segments[0].value=a.unoptimized_attachments,d.segments[1].value=a.optimized_attachments,d.segments[2].value=a.errors_attachments,d.update())});b("#imagify-simulate-bulk-action").click(function(c){c.preventDefault();b("#imagify-bulk-action").trigger("click")});b("#imagify-bulk-action").click(function(){var c=b(this),a=b('[name="optimization_level"]:checked').val();"undefined"===typeof a&&(a=-1);if(c.attr("disabled"))return!1;
7
+ c.attr("disabled","disabled");c.find(".dashicons").addClass("rotate");confirmMessage=function(){return imagifyBulk.labels.processing};b(window).on("beforeunload",confirmMessage);swal({title:imagifyBulk.labels.waitTitle,text:imagifyBulk.labels.waitText,closeOnConfirm:!1,showConfirmButton:!1,html:!0,imageUrl:imagifyBulk.labels.waitImageUrl});b.get(ajaxurl+k+"action="+imagifyBulk.ajax_action+"&optimization_level="+a+"&imagifybulkuploadnonce="+b("#imagifybulkuploadnonce").val()).done(function(a){if(a.success){swal.close();
8
  a={lib:ajaxurl+k+"action=imagify_bulk_upload&imagifybulkuploadnonce="+b("#imagifybulkuploadnonce").val(),images:a.data,context:imagifyBulk.ajax_context};var e=b(".imagify-bulk-table table tbody"),d=0,f=0,g=0,h=0;b(".imagify-row-progress").slideDown();b(".imagify-no-uploaded-yet, .imagify-row-complete").hide(200);Optimizer=new ImagifyGulp(a);Optimizer.before(function(b){e.find(".imagify-row-progress").after('<tr id="attachment-'+b.id+'"><td class="imagify-cell-filename"><span class="imagiuploaded"><img src="'+
9
  b.thumbnail+'"/>"</span><span class="imagifilename">'+b.filename+'</span></td><td class="imagify-cell-status"><span class="imagistatus status-compressing"><span class="dashicons dashicons-admin-generic rotate"></span>Compressing<span></span></span></td><td class="imagify-cell-original"></td><td class="imagify-cell-optimized"></td><td class="imagify-cell-percentage"></td><td class="imagify-cell-thumbnails"></td><td class="imagify-cell-savings"></td></tr>')}).each(function(a){var c=b("#imagify-progress-bar");
10
  c.css({width:a.progress+"%"});c.find(".percent").html(a.progress+"%");a.success?(b("#attachment-"+a.image+" .imagify-cell-status").html('<span class="imagistatus status-complete"><span class="dashicons dashicons-yes"></span>Complete</span>'),b("#attachment-"+a.image+" .imagify-cell-original").html(a.original_size_human),b("#attachment-"+a.image+" .imagify-cell-optimized").html(a.new_size_human),b("#attachment-"+a.image+" .imagify-cell-percentage").html('<span class="imagify-chart"><span class="imagify-chart-container"><canvas height="18" width="18" id="imagify-consumption-chart" style="width: 18px; height: 18px;"></canvas></span></span><span class="imagipercent">'+
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.2.1
7
  Author: WP Media
8
  Author URI: http://wp-media.me
9
  Licence: GPLv2
@@ -17,7 +17,7 @@ Copyright 2015 WP Media
17
  defined( 'ABSPATH' ) or die( 'Cheatin\' uh?' );
18
 
19
  // Imagify defines
20
- define( 'IMAGIFY_VERSION' , '1.5.2.1' );
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.3
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.3' );
21
  define( 'IMAGIFY_SLUG' , 'imagify' );
22
  define( 'IMAGIFY_SETTINGS_SLUG' , IMAGIFY_SLUG . '_settings' );
23
  define( 'IMAGIFY_WEB_MAIN' , 'https://imagify.io' );
inc/classes/abstracts/abstract-attachment.php CHANGED
@@ -181,12 +181,12 @@ class Imagify_Abstract_Attachment {
181
  */
182
  public function get_original_size( $human_format = true ) {
183
  $original_size = $this->get_size_data( 'full', 'original_size' );
184
- $original_size = ( empty( $original_size ) ) ? @filesize( $this->get_original_path() ) : 0;
185
 
186
  if ( true === $human_format ) {
187
  $original_size = @size_format( $original_size, 2 );
188
  }
189
-
190
  return $original_size;
191
  }
192
 
181
  */
182
  public function get_original_size( $human_format = true ) {
183
  $original_size = $this->get_size_data( 'full', 'original_size' );
184
+ $original_size = ( empty( $original_size ) ) ? @filesize( $this->get_original_path() ) : (int) $original_size;
185
 
186
  if ( true === $human_format ) {
187
  $original_size = @size_format( $original_size, 2 );
188
  }
189
+
190
  return $original_size;
191
  }
192
 
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.5.1
6
- Stable tag: 1.5.2.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -136,6 +136,10 @@ When the plugin is disabled, your existing images remain optimized. Backups of t
136
 
137
  == Changelog ==
138
 
 
 
 
 
139
  = 1.5.2.1 =
140
  * Bug Fix
141
  * Fix JS error: Uncaught ReferenceError: imagify is not defined in /assets/options.min.js
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.5.1
6
+ Stable tag: 1.5.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
136
 
137
  == Changelog ==
138
 
139
+ = 1.5.3 =
140
+ * Regression Fix
141
+ * Display the Original Filesize in "View Details" section
142
+
143
  = 1.5.2.1 =
144
  * Bug Fix
145
  * Fix JS error: Uncaught ReferenceError: imagify is not defined in /assets/options.min.js