PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / 1.3.5
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF v1.3.5
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
imagify / assets / js / imagify.min.js

imagify.min.js in Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF 1.3.5, at assets/js/imagify.min.js

2 lines 5.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var ImagifyGulp;ImagifyGulp=function(){function a(a){var b,c;return this.cnf=a,this.images=[],this.formatted_image_id=0,this.current_image_id=0,this.total_original_size=0,this.total_optimized_size=0,this.total_gain=0,this.total_percent=0,this.global_original_size=0,this.global_optimized_size=0,this.global_gain=0,this.global_percent=0,this.callbackEach=function(){},this.callbackBefore=function(){},this.callbackError=function(){},this.callbackDone=function(){},this.defaultThumb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAIAAACRuyQOAAACy0lEQVRIx+1XS1PTUBTuT/MB1NGF3bhyhys3Pv+Ai8pCF6Bb3bsWq8xAh8441I2TSlKwPIKQJsI40IbSV0pJ6qe3OeZ1b9PaYViQyaJzc+757j3nO985TVx5v3o+b+IS6XyQUgtrj/NqWtJmZf3lavnpl53bC2vjRLqRUV4pxqbZcnrBx3F6G2ZzTjFg879IMwWtanV7g56K1Z2RtBGRpj7IWb0a8HhqOz9O2rjHfrOD34GvWcPEruGQkhmlcFgnF7bjABVJmvA4uj4vY2VJr545/yClw/okBywaadF/m63j1gT/sNO5DbXW8t4sLtJzSQtnAme/ys/BrU9FpdIgY2R3MBLidtQ+ZRt2T9qZvQrtf/N9X5BwbEQKmSVIFGZjEGlWNojB93KbCBolDNl49nVPAIYwUs5QGAOQwCtmuuyGG5ExGhZbtM7s+5+3BGC5nyazhB8RElSAePRwRaX1u9nScadfVYjtncV1HtKDlW0KQMqvID4kCAydHST2fgKhu24B7dTaSY4oYBf2MjN44yK9+FZmRnrdCnuhr3jyB7Vr89G8L9f7oU77VSPhp4POjNarzUgv77Z/ERh+R9oUXbqDXFyktFtJ5ag74cU9cBsCwy3DNoht5Fcf0pO8ysuTt27IFzKH/Hm/Qopi5ekP99zzgkU8goF7VN21ThfM9BKHylHEPbzoQ8wUlSGoG1QVnR3Vhppj66hCtgg/Ayr3tdLXCFQ7al4ABr2gAEBHoCbQFDu+RkCvqPVBx5LCZvq2dEDsgELuDqV7rM/SfvmocfNjkYcEdV8Kdcu4Wh6QLzzoPQKtQ9DQvQL9ZYhOiCYteXougo/9UEIv9YHxKK+iZ9qenouE8QIunCMMMzxHYIIomU2ksBOaI5ZHmCO8OavEnI0K2hjmvTnevPe3bjBlTvKvMsoMi4kVAgO/qBXMGvidGu8Me/lf4yIg/QYbLcmjDg4bKwAAAABJRU5ErkJggg==",this.images=function(){var a,d;a=this.cnf.images,d=[];for(c in a)b=a[c],d.push(c);return d}.call(this),this.total_images=this.images.length,this.total_images?this:!1}return a.prototype.run=function(){return this.loop(),this},a.prototype.toHumanSize=function(a,b,c){var d,e;return null==b&&(b=1),null==c&&(c=!0),0===a?"0"+(c===!0?"kb":""):(e=["b","kb","mb"],d=parseInt(Math.floor(Math.log(a)/Math.log(1024))),(a/Math.pow(1024,d)).toFixed(b)+e[d])},a.prototype.each=function(a){return this.callbackEach=a,this},a.prototype.before=function(a){return this.callbackBefore=a,this},a.prototype.error=function(a){return this.callbackError=a,this},a.prototype.done=function(a){return this.callbackDone=a,this},a.prototype.createThumb=function(a,b){var c,d;return d=this,c=new Image,c.onerror=function(){return b.thumbnail=d.defaultThumb,d.callbackBefore(b),d.send()},c.onload=function(){var a,e,f,g,h,i,j,k,l,m;j=33,i=33,h=c.width,g=c.height,g>h?(m=j/h,l=j,k=g*m):(m=i/g,k=i,l=h*m),a=document.createElement("canvas"),a.width=l,a.height=k,c.width=l,c.height=k,e=a.getContext("2d"),e.drawImage(this,0,0,l,k);try{b.thumbnail=a.toDataURL("image/jpeg")}catch(n){f=n,b.thumbnail=d.defaultThumb}return d.callbackBefore(b),d.send()},c.src=a},a.prototype.loop=function(){var a,b;return this.formatted_image_id=this.images[this.current_image_id].toString().substr(1),this.current_image=this.images[this.current_image_id],b=this.cnf.images[this.current_image],a=b.split("/").pop(),this.createThumb(b,{id:this.formatted_image_id,filename:a})},a.prototype.send=function(){var a,b;return a=this,b=new XMLHttpRequest,b.onreadystatechange=function(){var b,c,d,e;return 4===this.readyState?(c=JSON.parse(this.responseText),b=c.data,d={success:b.success,image:parseInt(a.formatted_image_id),progress:Math.floor((a.current_image_id+1)/a.images.length*100),global_optimized_attachments:b.global_optimized_attachments,global_unoptimized_attachments:b.global_unoptimized_attachments,global_errors_attachments:b.global_errors_attachments,global_optimized_percent:b.global_optimized_percent},b.success!==!1?(a.total_original_size+=b.original_size,a.total_optimized_size+=b.new_size,a.total_gain+=b.original_size-b.new_size,a.total_percent=(a.total_optimized_size/a.total_original_size*100).toFixed(2),a.global_original_size+=b.original_overall_size,a.global_optimized_size+=b.new_overall_size,a.global_gain+=b.overall_saving,a.global_percent=(100-a.global_optimized_size/a.global_optimized_size*100).toFixed(2),d.original_size_human=a.toHumanSize(b.original_size),d.new_size_human=a.toHumanSize(b.new_size),d.percent=(100-b.new_size/b.original_size*100).toFixed(2),d.thumbnails=b.thumbnails,d.global_optimized_attachments_percent=b.global_optimized_attachments_percent,d.global_optimized_human=b.global_optimized_human,d.global_unconsumed_quota=b.global_unconsumed_quota,d.global_original_human=b.global_original_human,d.overall_saving=b.overall_saving,d.original_overall_size=b.original_overall_size,d.global_already_optimized_attachments=b.global_already_optimized_attachments):d.error=b.error,a.callbackEach(d),a.current_image_id++,a.current_image_id>=a.images.length?(e=0===a.global_original_size?0:(100-100*(a.global_optimized_size/a.global_original_size)).toFixed(2),a.callbackDone({global_original_size_human:a.toHumanSize(a.global_original_size),global_gain_human:a.toHumanSize(a.global_gain),global_percent:e})):a.loop()):void 0},b.open("POST",this.cnf.lib,!0),b.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),b.send("image="+a.formatted_image_id),this},a}();
2 //# sourceMappingURL=imagify.min.js.map