$module Plugin or Theme details.
*
* @return Freemius
* @throws Freemius_Exception
@@ -527,4 +527,4 @@ function fs_dynamic_init( $module ) {
function fs_dump_log() {
FS_Logger::dump();
}
- }
\ No newline at end of file
+ }
diff --git a/external/Freemius/templates/account.php b/external/Freemius/templates/account.php
index ca3a6c44..a5d8f7c7 100755
--- a/external/Freemius/templates/account.php
+++ b/external/Freemius/templates/account.php
@@ -21,7 +21,9 @@
/**
* @var FS_Plugin_Tag $update
*/
- $update = $fs->get_update( false, false, WP_FS__TIME_24_HOURS_IN_SEC / 24 );
+ $update = $fs->has_release_on_freemius() ?
+ $fs->get_update( false, false, WP_FS__TIME_24_HOURS_IN_SEC / 24 ) :
+ null;
if ( is_object($update) ) {
/**
@@ -433,11 +435,11 @@ class="dashicons dashicons-image-rotate"> $fs->get_plugin_version()
);
- if ( $is_premium && ! $is_whitelabeled ) {
+ if ( ! fs_is_network_admin() && $is_premium && ! $is_whitelabeled ) {
$profile[] = array(
'id' => 'beta_program',
'title' => '',
- 'value' => $user->is_beta
+ 'value' => $site->is_beta
);
}
diff --git a/external/Freemius/templates/connect.php b/external/Freemius/templates/connect.php
index d5ef39e6..5919ac8b 100755
--- a/external/Freemius/templates/connect.php
+++ b/external/Freemius/templates/connect.php
@@ -181,12 +181,7 @@ class="wrapis_enable_anonymous()
$message = $fs->apply_filters(
'connect-message_on-premium',
- ($is_network_upgrade_mode ?
- '' :
- /* translators: %s: name (e.g. Hey John,) */
- $hey_x_text . '
'
- ) .
- sprintf( fs_text_inline( 'Thanks for purchasing %s! To get started, please enter your license key:', 'thanks-for-purchasing', $slug ), '' . $fs->get_plugin_name() . '' ),
+ sprintf( fs_text_inline( 'Welcome to %s! To get started, please enter your license key:', 'thanks-for-purchasing', $slug ), '' . $fs->get_plugin_name() . '' ),
$first_name,
$fs->get_plugin_name()
);
@@ -347,6 +342,9 @@ class="button button-secondary" tabindex="2">>
+
+
+
'dashicons dashicons-admin-settings',
- 'label' => $fs->get_text_inline( 'Your Site Overview', 'permissions-site' ),
- 'desc' => $fs->get_text_inline( 'Site URL, WP version, PHP info', 'permissions-site_desc' ),
- 'priority' => 10,
- );
-
- $permissions['notices'] = array(
- 'icon-class' => 'dashicons dashicons-testimonial',
- 'label' => $fs->get_text_inline( 'Admin Notices', 'permissions-admin-notices' ),
- 'desc' => $fs->get_text_inline( 'Updates, announcements, marketing, no spam', 'permissions-newsletter_desc' ),
- 'priority' => 13,
- );
+ $permissions['site'] = array(
+ 'icon-class' => 'dashicons dashicons-admin-settings',
+ 'tooltip' => ( $require_license_key ? sprintf( $fs->get_text_inline( 'So you can manage and control your license remotely from the User Dashboard.', 'permissions-site_tooltip' ), $fs->get_module_type() ) : '' ),
+ 'label' => $fs->get_text_inline( 'Your Site Overview', 'permissions-site' ),
+ 'desc' => $fs->get_text_inline( 'Site URL, WP version, PHP info', 'permissions-site_desc' ),
+ 'priority' => 10,
+ );
+
+ if ( ! $require_license_key ) {
+ $permissions['notices'] = array(
+ 'icon-class' => 'dashicons dashicons-testimonial',
+ 'label' => $fs->get_text_inline( 'Admin Notices', 'permissions-admin-notices' ),
+ 'desc' => $fs->get_text_inline( 'Updates, announcements, marketing, no spam', 'permissions-newsletter_desc' ),
+ 'priority' => 13,
+ );
+ }
- $permissions['events'] = array(
- 'icon-class' => 'dashicons dashicons-admin-' . ( $fs->is_plugin() ? 'plugins' : 'appearance' ),
- 'label' => sprintf( $fs->get_text_inline( 'Current %s Events', 'permissions-events' ), ucfirst( $fs->get_module_type() ) ),
- 'desc' => $fs->get_text_inline( 'Activation, deactivation and uninstall', 'permissions-events_desc' ),
- 'priority' => 20,
- );
+ $permissions['events'] = array(
+ 'icon-class' => 'dashicons dashicons-admin-' . ( $fs->is_plugin() ? 'plugins' : 'appearance' ),
+ 'tooltip' => ( $require_license_key ? sprintf( $fs->get_text_inline( 'So you can reuse the license when the %s is no longer active.', 'permissions-events_tooltip' ), $fs->get_module_type() ) : '' ),
+ 'label' => sprintf( $fs->get_text_inline( 'Current %s Status', 'permissions-events' ), ucfirst( $fs->get_module_type() ) ),
+ 'desc' => $fs->get_text_inline( 'Active, deactivated, or uninstalled', 'permissions-events_desc' ),
+ 'priority' => 20,
+ );
// Add newsletter permissions if enabled.
if ( $is_gdpr_required || $fs->is_permission_requested( 'newsletter' ) ) {
@@ -398,14 +400,15 @@ class="button button-secondary" tabindex="2"> 'dashicons dashicons-menu',
- 'label' => $fs->get_text_inline( 'Plugins & Themes', 'permissions-extensions' ),
+ 'label' => $fs->get_text_inline( 'Plugins & Themes', 'permissions-extensions' ) . ( $require_license_key ? ' (' . $fs->get_text_inline( 'optional' ) . ')' : '' ),
+ 'tooltip' => $fs->get_text_inline( 'To help us troubleshoot any potential issues that may arise from other plugin or theme conflicts.', 'permissions-events_tooltip' ),
'desc' => $fs->get_text_inline( 'Title, slug, version, and is active', 'permissions-extensions_desc' ),
'priority' => 25,
'optional' => true,
- 'default' => $fs->apply_filters( 'permission_extensions_default', true )
- );
+ 'default' => $fs->apply_filters( 'permission_extensions_default', ! $require_license_key )
+ );
// Allow filtering of the permissions list.
$permissions = $fs->apply_filters( 'permission_list', $permissions );
@@ -417,13 +420,15 @@ class="button button-secondary" tabindex="2">
get_module_label( true ),
- $freemius_link
+ sprintf('%s', fs_esc_html_inline('diagnostic data', 'send-data')),
+ 'freemius.com ' . $fs->get_text_inline( 'Freemius is our licensing and software updates engine', 'permissions-extensions_desc' ) . ''
) ?>
-
+
+
$permission ) : ?>
-
-
+
class="fs-tooltip-trigger">
@@ -702,9 +707,16 @@ function updatePrimaryCtaText( actionType ) {
var ajaxOptin = ( requireLicenseKey || isNetworkActive );
$form.on('submit', function () {
- var isExtensionsTrackingAllowed = $( '#fs-permission-extensions .fs-switch' ).hasClass( 'fs-on' );
-
- $( 'input[name=is_extensions_tracking_allowed]' ).val( isExtensionsTrackingAllowed ? 1 : 0 );
+ var $extensionsPermission = $('#fs-permission-extensions .fs-switch'),
+ isExtensionsTrackingAllowed = ($extensionsPermission.length > 0) ?
+ $extensionsPermission.hasClass('fs-on') :
+ null;
+
+ if (null === isExtensionsTrackingAllowed) {
+ $('input[name=is_extensions_tracking_allowed]').remove();
+ } else {
+ $('input[name=is_extensions_tracking_allowed]').val(isExtensionsTrackingAllowed ? 1 : 0);
+ }
/**
* @author Vova Feldman (@svovaf)
diff --git a/external/Freemius/templates/forms/license-activation.php b/external/Freemius/templates/forms/license-activation.php
index 87c5bb13..639f433e 100755
--- a/external/Freemius/templates/forms/license-activation.php
+++ b/external/Freemius/templates/forms/license-activation.php
@@ -115,13 +115,15 @@
* @var FS_Plugin_License $license
*/
foreach ( $available_licenses as $license ) {
+ $plan = $fs->_get_plan_by_id( $license->plan_id );
+
$label = sprintf(
"%s-Site %s License - %s",
( 1 == $license->quota ?
'Single' :
( $license->is_unlimited() ? 'Unlimited' : $license->quota )
),
- $fs->_get_plan_by_id( $license->plan_id )->title,
+ ( is_object( $plan ) ? $plan->title : '' ),
$license->get_html_escaped_masked_secret_key()
);
diff --git a/ilab-media-tools.php b/ilab-media-tools.php
index 7c0e62ee..b208f5a3 100755
--- a/ilab-media-tools.php
+++ b/ilab-media-tools.php
@@ -5,7 +5,7 @@
Plugin URI: https://github.com/interfacelab/ilab-media-tools
Description: Automatically upload media to Amazon S3 and integrate with Imgix, a real-time image processing CDN. Boosts site performance and simplifies workflows.
Author: interfacelab
-Version: 4.2.3
+Version: 4.2.6
Author URI: http://interfacelab.io
*/
// Copyright (c) 2016 Interfacelab LLC. All rights reserved.
@@ -94,7 +94,7 @@
}
// Version Defines
-define( 'MEDIA_CLOUD_VERSION', '4.2.3' );
+define( 'MEDIA_CLOUD_VERSION', '4.2.6' );
define( 'MEDIA_CLOUD_INFO_VERSION', '4.0.2' );
define( 'MCLOUD_IS_BETA', false );
// Directory defines
@@ -174,9 +174,10 @@ function media_cloud_licensing()
media_cloud_licensing()->add_filter( 'permission_list', function ( $permissions ) {
$permissions['feature-tracking'] = array(
'icon-class' => 'dashicons dashicons-admin-generic',
- 'label' => media_cloud_licensing()->get_text_inline( 'Plugin Features', 'plugin-features' ),
- 'desc' => media_cloud_licensing()->get_text_inline( 'Anonymously track which plugin features are being used to allow us to prioritize development.', 'permissions-plugin-features' ),
- 'priority' => 16,
+ 'label' => media_cloud_licensing()->get_text_inline( 'Media Cloud Features', 'plugin-features' ),
+ 'desc' => media_cloud_licensing()->get_text_inline( 'Anonymously track which Media Cloud features are being used to allow us to prioritize development.', 'permissions-plugin-features' ),
+ 'priority' => 50,
+ 'optional' => true,
);
return $permissions;
} );
diff --git a/public/js/ilab-media-direct-upload-google.js b/public/js/ilab-media-direct-upload-google.js
index 4446a259..da99bfe2 100755
--- a/public/js/ilab-media-direct-upload-google.js
+++ b/public/js/ilab-media-direct-upload-google.js
@@ -1 +1 @@
-!function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=630)}({113:function(t,e,r){var o=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},n=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function l(t,e,r,o){var n=e&&e.prototype instanceof s?e:s,i=Object.create(n.prototype),a=new b(o||[]);return i._invoke=function(t,e,r){var o="suspendedStart";return function(n,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw i;return S()}for(r.method=n,r.arg=i;;){var a=r.delegate;if(a){var l=w(a,r);if(l){if(l===c)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var s=u(t,e,r);if("normal"===s.type){if(o=r.done?"completed":"suspendedYield",s.arg===c)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var c={};function s(){}function h(){}function d(){}var p={};p[n]=function(){return this};var f=Object.getPrototypeOf,g=f&&f(f(L([])));g&&g!==e&&r.call(g,n)&&(p=g);var m=d.prototype=s.prototype=Object.create(p);function y(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function v(t,e){var o;this._invoke=function(n,i){function a(){return new e((function(o,a){!function o(n,i,a,l){var c=u(t[n],t,i);if("throw"!==c.type){var s=c.arg,h=s.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(h).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,l)}))}l(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var o=u(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,c;var n=o.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function b(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(t){if(t){var e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function e(){for(;++o=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;x(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},t}(t.exports);try{regeneratorRuntime=o}catch(t){Function("r","regeneratorRuntime = r")(o)}},630:function(t,e,r){t.exports=r(631)},631:function(t,e,r){"use strict";r.r(e);var o=r(65),n=r.n(o);function i(t,e,r,o,n,i,a){try{var l=t[i](a),u=l.value}catch(t){return void r(t)}l.done?e(u):Promise.resolve(u).then(o,n)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(o,n){var a=t.apply(e,r);function l(t){i(a,o,n,l,u,"next",t)}function u(t){i(a,o,n,l,u,"throw",t)}l(void 0)}))}}window.ILABUploadToGoogleStorage=function(t,e,r,o){var i={action:"ilab_upload_prepare",filename:t.name,type:r};o.hasOwnProperty("uploadDirectory")&&(i.directory=o.uploadDirectory),console.log("Getting upload URL ..."),console.time("Getting upload URL"),jQuery.post(ajaxurl,i,(function(i){if("ready"===i.status){console.timeEnd("Getting upload URL"),o.set({state:"uploading"});var l=-1,u=Object.keys(i.sizes),c=[],s=i.key.split("."),h=s.length>2?s.slice(0,s.length-1).join("."):s[0],d=s.length>1?"."+s[s.length-1]:"";d=d.toLowerCase();var p=null,f=null,g=function(e,r){console.log("Initial storage POST ..."),console.time("Initial upload to storage"),jQuery.ajax({url:e,method:"POST",headers:{"x-goog-resumable":"start","Content-Type":t.type},success:function(e,n,i){console.timeEnd("Initial upload to storage");var a=i.getResponseHeader("location");console.log("Actual storage upload ..."),console.time("Upload to storage"),jQuery.ajax({url:a,method:"PUT",processData:!1,crossDomain:!0,data:r,contentType:t.type,xhr:function(){var e=jQuery.ajaxSettings.xhr();return e.upload.onprogress=function(e){if(-1===t.type.indexOf("image/")||1===u.length){var r=e.loaded/e.total*100;o.set({progress:r})}else{var n=100/u.length,i=n*l+e.loaded/e.total*n;o.set({progress:i})}}.bind(this),e},success:function(t){console.timeEnd("Upload to storage"),y()},error:function(t){console.timeEnd("Upload to storage"),o.uploadError()}})},error:function(t){window.hasOwnProperty("mediaCloudDirectUploadError")&&!1!==window.mediaCloudDirectUploadError||(window.mediaCloudDirectUploadError=!0,alert("There was an error uploading this item. The most likely cause is that you don't have CORS configured correctly on your bucket.")),console.timeEnd("Initial upload to storage"),o.uploadError()}})},m=function(t,e){console.log("Upload new key ...");var n={action:"ilab_upload_prepare_next",key:t,type:r};o.hasOwnProperty("uploadDirectory")&&(n.directory=o.uploadDirectory),console.log("Getting new upload URL ..."),console.time("Getting upload URL"),jQuery.post(ajaxurl,n,(function(t){console.timeEnd("Getting upload URL"),t.hasOwnProperty("url")?g(t.url,e):o.uploadError()}))},y=function r(){if(console.log("Upload next size ..."),++l>=u.length||-1===t.type.indexOf("image/")||1===u.length)o.uploadFinished(i.key,e,c);else{var s=u[l];if("full"!==s)if(mediaCloudDirectUploadSettings.generateThumbnails){var y=function(e){var n=i.sizes[s],a=e.bitmap.width,l=e.bitmap.height;if(n.width>a&&n.height>l)r();else{if(console.log("Resizing JPEG file ..."),console.time("Resize JPEG image"),n.crop)e.cover(n.width,n.height,Jimp.HORIZONTAL_ALIGN_CENTER|Jimp.VERTICAL_ALIGN_MIDDLE,Jimp.RESIZE_BEZIER);else{var u=o.sizeToFitSize(a,l,n.width,n.height);e.resize(u[0],u[1],Jimp.RESIZE_BEZIER)}var p=h+"-"+e.bitmap.width+"x"+e.bitmap.height+d;"image/jpeg"!==t.type&&"image/jpg"!==t.type||e.quality(mediaCloudDirectUploadSettings.imageQuality),console.timeEnd("Resize JPEG image"),console.time("Get JPEG buffer"),e.getBuffer(t.type,(function(r,n){if(console.timeEnd("Get JPEG buffer"),null!=r)o.uploadError();else{var i={size:s,key:p,mime:t.type,width:e.bitmap.width,height:e.bitmap.height};c.push(i);var a=new File([n],p,{type:t.type});m(p,a)}}))}},v=function(t){var e=i.sizes[s],n=t.width,a=t.height;if(e.width>n&&e.height>a)r();else if(e.crop){var l=o.sizeToFillSize(n,a,e.width,e.height),u=h+"-"+e.width+"x"+e.height+d,p=document.createElement("canvas");p.width=l[0],p.height=l[1];var f=p.getContext("2d",{alpha:!0});f.imageSmoothingEnabled=!0,f.imageSmoothingQuality="high",f.drawImage(t,0,0,l[0],l[1]);var g=document.createElement("canvas"),y=g.getContext("2d",{alpha:!0});g.width=e.width,g.height=e.height,y.drawImage(p,Math.floor(e.width/2-l[0]/2),Math.floor(e.height/2-l[1]/2)),g.toBlob((function(t){var r={size:s,key:u,mime:"image/png",width:e.width,height:e.height};c.push(r),m(u,t)}),"image/png")}else{var v=o.sizeToFitSize(n,a,e.width,e.height),w=h+"-"+v[0]+"x"+v[1]+d,E=document.createElement("canvas");E.width=v[0],E.height=v[1];var x=E.getContext("2d",{alpha:!0});x.imageSmoothingEnabled=!0,x.imageSmoothingQuality="high",x.drawImage(t,0,0,v[0],v[1]),E.toBlob((function(t){var r={size:s,key:w,mime:"image/png",width:e.width,height:e.height};c.push(r),m(w,t)}),"image/png")}};if("image/png"===t.type)if(null==f){var w=new FileReader;w.onload=function(){(f=new Image).onload=function(){v(f)},f.src=w.result},w.readAsDataURL(t)}else v(f);else if(null==p){console.log("Reading JPEG file ...");var E=new FileReader;console.time("Read JPEG file"),E.onload=a(n.a.mark((function t(){var e;return n.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Jimp.read(E.result);case 2:p=t.sent,console.timeEnd("Read JPEG file"),(p.bitmap.width>2560||p.bitmap.height>2560)&&(console.log("Resizing huge image ..."),console.time("Resizing huge image"),e=o.sizeToFitSize(p.bitmap.width,p.bitmap.height,2560,2560),p.resize(e[0],e[1],Jimp.RESIZE_BEZIER),console.timeEnd("Resizing huge image")),y(p.clone());case 6:case"end":return t.stop()}}),t)}))),E.readAsArrayBuffer(t)}else y(p.clone())}else r();else g(i.url,t)}};-1===t.type.indexOf("image/")||1===u.length?g(i.url,t):y()}else o.uploadError()}))},"undefined"!=typeof DirectUploadItem&&(DirectUploadItem.prototype.uploadToStorage=ILABUploadToGoogleStorage),ilabMediaUploadItem.prototype.uploadToStorage=ILABUploadToGoogleStorage},65:function(t,e,r){t.exports=r(113)}});
\ No newline at end of file
+!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=630)}({113:function(e,t,r){var o=function(e){"use strict";var t=Object.prototype,r=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},n=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function l(e,t,r,o){var n=t&&t.prototype instanceof s?t:s,i=Object.create(n.prototype),a=new b(o||[]);return i._invoke=function(e,t,r){var o="suspendedStart";return function(n,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw i;return S()}for(r.method=n,r.arg=i;;){var a=r.delegate;if(a){var l=w(a,r);if(l){if(l===c)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var s=u(e,t,r);if("normal"===s.type){if(o=r.done?"completed":"suspendedYield",s.arg===c)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o="completed",r.method="throw",r.arg=s.arg)}}}(e,r,a),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function s(){}function h(){}function d(){}var p={};p[n]=function(){return this};var f=Object.getPrototypeOf,g=f&&f(f(L([])));g&&g!==t&&r.call(g,n)&&(p=g);var m=d.prototype=s.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function v(e,t){var o;this._invoke=function(n,i){function a(){return new t((function(o,a){!function o(n,i,a,l){var c=u(e[n],e,i);if("throw"!==c.type){var s=c.arg,h=s.value;return h&&"object"==typeof h&&r.call(h,"__await")?t.resolve(h.__await).then((function(e){o("next",e,a,l)}),(function(e){o("throw",e,a,l)})):t.resolve(h).then((function(e){s.value=e,a(s)}),(function(e){return o("throw",e,a,l)}))}l(c.arg)}(n,i,o,a)}))}return o=o?o.then(a,a):a()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var o=u(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,c;var n=o.arg;return n?n.done?(t[e.resultName]=n.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):n:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(e){if(e){var t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var o=r.completion;if("throw"===o.type){var n=o.arg;x(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:L(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=o}catch(e){Function("r","regeneratorRuntime = r")(o)}},630:function(e,t,r){e.exports=r(631)},631:function(e,t,r){"use strict";r.r(t);var o=r(65),n=r.n(o);function i(e,t,r,o,n,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(o,n)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(o,n){var a=e.apply(t,r);function l(e){i(a,o,n,l,u,"next",e)}function u(e){i(a,o,n,l,u,"throw",e)}l(void 0)}))}}window.ILABUploadToGoogleStorage=function(e,t,r,o){var i={action:"ilab_upload_prepare",filename:e.name,type:r};o.hasOwnProperty("uploadDirectory")&&(i.directory=o.uploadDirectory),console.log("Getting upload URL ..."),console.time("Getting upload URL"),jQuery.post(ajaxurl,i,(function(i){if("ready"===i.status){console.timeEnd("Getting upload URL"),o.set({state:"uploading"});var l=-1,u=Object.keys(i.sizes),c=[],s=i.key.split("."),h=s.length>2?s.slice(0,s.length-1).join("."):s[0],d=s.length>1?"."+s[s.length-1]:"";d=d.toLowerCase();var p=null,f=null,g=function(t,r){console.log("Initial storage POST ..."),console.time("Initial upload to storage"),jQuery.ajax({url:t,method:"POST",headers:{"x-goog-resumable":"start","Content-Type":e.type},success:function(t,n,i){console.timeEnd("Initial upload to storage");var a=i.getResponseHeader("location");console.log("Actual storage upload ..."),console.time("Upload to storage"),jQuery.ajax({url:a,method:"PUT",processData:!1,crossDomain:!0,data:r,contentType:e.type,xhr:function(){var t=jQuery.ajaxSettings.xhr();return t.upload.onprogress=function(t){if(-1===e.type.indexOf("image/")||1===u.length){var r=t.loaded/t.total*100;o.set({progress:r})}else{var n=100/u.length,i=n*l+t.loaded/t.total*n;o.set({progress:i})}}.bind(this),t},success:function(e){console.timeEnd("Upload to storage"),y()},error:function(e){console.timeEnd("Upload to storage"),o.uploadError()}})},error:function(e){window.hasOwnProperty("mediaCloudDirectUploadError")&&!1!==window.mediaCloudDirectUploadError||(window.mediaCloudDirectUploadError=!0,alert("There was an error uploading this item. The most likely cause is that you don't have CORS configured correctly on your bucket.")),console.timeEnd("Initial upload to storage"),o.uploadError()}})},m=function(e,t){console.log("Upload new key ...");var n={action:"ilab_upload_prepare_next",key:e,type:r};o.hasOwnProperty("uploadDirectory")&&(n.directory=o.uploadDirectory),console.log("Getting new upload URL ..."),console.time("Getting upload URL"),jQuery.post(ajaxurl,n,(function(e){console.timeEnd("Getting upload URL"),e.hasOwnProperty("url")?g(e.url,t):o.uploadError()}))},y=function r(){if(console.log("Upload next size ..."),++l>=u.length||-1===e.type.indexOf("image/")||1===u.length)o.uploadFinished(i.key,t,c);else{var s=u[l];if("full"!==s)if(mediaCloudDirectUploadSettings.generateThumbnails){var y=function(t){var n=i.sizes[s],a=t.bitmap.width,l=t.bitmap.height;if(n.width>a&&n.height>l)r();else{if(console.log("Resizing JPEG file ..."),console.time("Resize JPEG image"),n.crop)t.cover(n.width,n.height,Jimp.HORIZONTAL_ALIGN_CENTER|Jimp.VERTICAL_ALIGN_MIDDLE,Jimp.RESIZE_BEZIER);else{var u=o.sizeToFitSize(a,l,n.width,n.height);t.resize(u[0],u[1],Jimp.RESIZE_BEZIER)}var p=h+"-"+t.bitmap.width+"x"+t.bitmap.height+d;"image/jpeg"!==e.type&&"image/jpg"!==e.type||t.quality(mediaCloudDirectUploadSettings.imageQuality),console.timeEnd("Resize JPEG image"),console.time("Get JPEG buffer"),t.getBuffer(e.type,(function(r,n){if(console.timeEnd("Get JPEG buffer"),null!=r)o.uploadError();else{var i={size:s,key:p,mime:e.type,width:t.bitmap.width,height:t.bitmap.height};c.push(i);var a=new File([n],p,{type:e.type});m(p,a)}}))}},v=function(e){var t=i.sizes[s],n=e.width,a=e.height;if(t.width>n&&t.height>a)r();else if(t.crop){var l=o.sizeToFillSize(n,a,t.width,t.height),u=h+"-"+t.width+"x"+t.height+d,p=document.createElement("canvas");p.width=l[0],p.height=l[1];var f=p.getContext("2d",{alpha:!0});f.imageSmoothingEnabled=!0,f.imageSmoothingQuality="high",f.drawImage(e,0,0,l[0],l[1]);var g=document.createElement("canvas"),y=g.getContext("2d",{alpha:!0});g.width=t.width,g.height=t.height,y.drawImage(p,Math.floor(t.width/2-l[0]/2),Math.floor(t.height/2-l[1]/2)),g.toBlob((function(e){var r={size:s,key:u,mime:"image/png",width:t.width,height:t.height};c.push(r),m(u,e)}),"image/png")}else{var v=o.sizeToFitSize(n,a,t.width,t.height),w=h+"-"+v[0]+"x"+v[1]+d,E=document.createElement("canvas");E.width=v[0],E.height=v[1];var x=E.getContext("2d",{alpha:!0});x.imageSmoothingEnabled=!0,x.imageSmoothingQuality="high",x.drawImage(e,0,0,v[0],v[1]),E.toBlob((function(e){var r={size:s,key:w,mime:"image/png",width:t.width,height:t.height};c.push(r),m(w,e)}),"image/png")}};if("image/png"===e.type)if(null==f){var w=new FileReader;w.onload=function(){(f=new Image).onload=function(){v(f)},f.src=w.result},w.readAsDataURL(e)}else v(f);else if(null==p){console.log("Reading JPEG file ...");var E=new FileReader;console.time("Read JPEG file"),E.onload=a(n.a.mark((function e(){var t,r;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Jimp.decoders["image/jpeg"],Jimp.decoders["image/jpeg"]=function(e){return t(e,{maxMemoryUsageInMB:2048})},e.prev=2,e.next=5,Jimp.read(E.result);case 5:p=e.sent,console.timeEnd("Read JPEG file"),(p.bitmap.width>2560||p.bitmap.height>2560)&&(console.log("Resizing huge image ..."),console.time("Resizing huge image"),r=o.sizeToFitSize(p.bitmap.width,p.bitmap.height,2560,2560),p.resize(r[0],r[1],Jimp.RESIZE_BEZIER),console.timeEnd("Resizing huge image")),y(p.clone()),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(2),alert("Insufficient memory to process image. Please resize before uploading again."),o.uploadError();case 15:case"end":return e.stop()}}),e,null,[[2,11]])}))),E.readAsArrayBuffer(e)}else y(p.clone())}else r();else g(i.url,e)}};-1===e.type.indexOf("image/")||1===u.length?g(i.url,e):y()}else o.uploadError()}))},"undefined"!=typeof DirectUploadItem&&(DirectUploadItem.prototype.uploadToStorage=ILABUploadToGoogleStorage),ilabMediaUploadItem.prototype.uploadToStorage=ILABUploadToGoogleStorage},65:function(e,t,r){e.exports=r(113)}});
\ No newline at end of file
diff --git a/public/js/ilab-media-direct-upload-other-s3.js b/public/js/ilab-media-direct-upload-other-s3.js
index eb9bd0bb..c0330405 100755
--- a/public/js/ilab-media-direct-upload-other-s3.js
+++ b/public/js/ilab-media-direct-upload-other-s3.js
@@ -1 +1 @@
-!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=632)}({113:function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new x(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===c)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var h=l(t,e,r);if("normal"===h.type){if(n=r.done?"completed":"suspendedYield",h.arg===c)continue;return{value:h.arg,done:r.done}}"throw"===h.type&&(n="completed",r.method="throw",r.arg=h.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var c={};function h(){}function s(){}function f(){}var d={};d[o]=function(){return this};var p=Object.getPrototypeOf,g=p&&p(p(L([])));g&&g!==e&&r.call(g,o)&&(d=g);var y=f.prototype=h.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function v(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var c=l(t[o],t,i);if("throw"!==c.type){var h=c.arg,s=h.value;return s&&"object"==typeof s&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(s).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(u&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},632:function(t,e,r){t.exports=r(633)},633:function(t,e,r){"use strict";r.r(e);var n=r(65),o=r.n(n);function i(t,e,r,n,o,i,a){try{var u=t[i](a),l=u.value}catch(t){return void r(t)}u.done?e(l):Promise.resolve(l).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function u(t){i(a,n,o,u,l,"next",t)}function l(t){i(a,n,o,u,l,"throw",t)}u(void 0)}))}}window.ILABUploadToOtherS3Storage=function(t,e,r,n){var i={action:"ilab_upload_prepare",filename:t.name,type:r};n.hasOwnProperty("uploadDirectory")&&(i.directory=n.uploadDirectory),console.time("Getting upload URL"),jQuery.post(ajaxurl,i,function(i){if("ready"===i.status){console.timeEnd("Getting upload URL"),n.set({state:"uploading"});var u=-1,l=Object.keys(i.sizes),c=[],h=i.key.split("."),s=h.length>2?h.slice(0,h.length-1).join("."):h[0],f=h.length>1?"."+h[h.length-1]:"";f=f.toLowerCase();var d=null,p=null,g=function(t,e){console.time("Upload to storage");var r=new XMLHttpRequest;r.open("PUT",t,!0),r.upload.onprogress=function(t){var e=100/l.length,r=e*u+t.loaded/t.total*e;n.set({progress:r})},r.onload=function(){console.timeEnd("Upload to storage"),m()},r.onerror=function(){window.hasOwnProperty("mediaCloudDirectUploadError")&&!1!==window.mediaCloudDirectUploadError||(window.mediaCloudDirectUploadError=!0,alert("There was an error uploading this item. The most likely cause is that you don't have CORS configured correctly on your bucket.")),console.timeEnd("Upload to storage"),n.uploadError()},r.send(e)},y=function(t,e){var o={action:"ilab_upload_prepare_next",key:t,type:r};n.hasOwnProperty("uploadDirectory")&&(o.directory=n.uploadDirectory),console.time("Getting upload URL"),jQuery.post(ajaxurl,o,(function(t){console.timeEnd("Getting upload URL"),t.hasOwnProperty("url")?g(t.url,e):n.uploadError()}))},m=function r(){if(++u>=l.length||-1===t.type.indexOf("image/")||1===l.length)n.uploadFinished(i.key,e,c);else{var h=l[u];if("full"!==h)if(mediaCloudDirectUploadSettings.generateThumbnails){var m=function(e){console.time("Resize JPEG image");var o=i.sizes[h],a=e.bitmap.width,u=e.bitmap.height;if(o.width>a&&o.height>u)r();else{if(o.crop)e.cover(o.width,o.height,Jimp.HORIZONTAL_ALIGN_CENTER|Jimp.VERTICAL_ALIGN_MIDDLE,Jimp.RESIZE_BEZIER);else{var l=n.sizeToFitSize(a,u,o.width,o.height);e.resize(l[0],l[1],Jimp.RESIZE_BEZIER)}var d=s+"-"+e.bitmap.width+"x"+e.bitmap.height+f;"image/jpeg"!==t.type&&"image/jpg"!==t.type||e.quality(mediaCloudDirectUploadSettings.imageQuality),console.timeEnd("Resize JPEG image"),console.time("Get JPEG buffer"),e.getBuffer(t.type,(function(r,o){if(console.timeEnd("Get JPEG buffer"),null!=r)n.uploadError();else{var i={size:h,key:d,mime:t.type,width:e.bitmap.width,height:e.bitmap.height};c.push(i);var a=new File([o],d,{type:t.type});y(d,a)}}))}},v=function(t){var e=i.sizes[h],o=t.width,a=t.height;if(e.width>o&&e.height>a)r();else if(e.crop){var u=n.sizeToFillSize(o,a,e.width,e.height),l=s+"-"+e.width+"x"+e.height+f,d=document.createElement("canvas");d.width=u[0],d.height=u[1];var p=d.getContext("2d",{alpha:!0});p.imageSmoothingEnabled=!0,p.imageSmoothingQuality="high",p.drawImage(t,0,0,u[0],u[1]);var g=document.createElement("canvas"),m=g.getContext("2d",{alpha:!0});g.width=e.width,g.height=e.height,m.drawImage(d,Math.floor(e.width/2-u[0]/2),Math.floor(e.height/2-u[1]/2)),g.toBlob((function(t){var r={size:h,key:l,mime:"image/png",width:e.width,height:e.height};c.push(r),y(l,t)}),"image/png")}else{var v=n.sizeToFitSize(o,a,e.width,e.height),w=s+"-"+v[0]+"x"+v[1]+f,E=document.createElement("canvas");E.width=v[0],E.height=v[1];var b=E.getContext("2d",{alpha:!0});b.imageSmoothingEnabled=!0,b.imageSmoothingQuality="high",b.drawImage(t,0,0,v[0],v[1]),E.toBlob((function(t){var r={size:h,key:w,mime:"image/png",width:e.width,height:e.height};c.push(r),y(w,t)}),"image/png")}};if("image/png"===t.type)if(null==p){var w=new FileReader;w.onload=function(){(p=new Image).onload=function(){v(p)},p.src=w.result},w.readAsDataURL(t)}else v(p);else if(null==d){var E=new FileReader;E.onload=a(o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Jimp.read(E.result);case 2:d=t.sent,m(d.clone());case 4:case"end":return t.stop()}}),t)}))),E.readAsArrayBuffer(t)}else m(d.clone())}else r();else g(i.url,t)}};-1===t.type.indexOf("image/")||1===l.length?g(i.url,t):m()}else n.uploadError()}.bind(this))},"undefined"!=typeof DirectUploadItem&&(DirectUploadItem.prototype.uploadToStorage=ILABUploadToOtherS3Storage),ilabMediaUploadItem.prototype.uploadToStorage=ILABUploadToOtherS3Storage},65:function(t,e,r){t.exports=r(113)}});
\ No newline at end of file
+!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=632)}({113:function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new x(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var h=c(t,e,r);if("normal"===h.type){if(n=r.done?"completed":"suspendedYield",h.arg===l)continue;return{value:h.arg,done:r.done}}"throw"===h.type&&(n="completed",r.method="throw",r.arg=h.arg)}}}(t,r,a),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function s(){}function p(){}var f={};f[o]=function(){return this};var d=Object.getPrototypeOf,g=d&&d(d(L([])));g&&g!==e&&r.call(g,o)&&(f=g);var m=p.prototype=h.prototype=Object.create(f);function y(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function v(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var l=c(t[o],t,i);if("throw"!==l.type){var h=l.arg,s=h.value;return s&&"object"==typeof s&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(s).then((function(t){h.value=t,a(h)}),(function(t){return n("throw",t,a,u)}))}u(l.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},632:function(t,e,r){t.exports=r(633)},633:function(t,e,r){"use strict";r.r(e);var n=r(65),o=r.n(n);function i(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)}))}}window.ILABUploadToOtherS3Storage=function(t,e,r,n){var i={action:"ilab_upload_prepare",filename:t.name,type:r};n.hasOwnProperty("uploadDirectory")&&(i.directory=n.uploadDirectory),console.time("Getting upload URL"),jQuery.post(ajaxurl,i,function(i){if("ready"===i.status){console.timeEnd("Getting upload URL"),n.set({state:"uploading"});var u=-1,c=Object.keys(i.sizes),l=[],h=i.key.split("."),s=h.length>2?h.slice(0,h.length-1).join("."):h[0],p=h.length>1?"."+h[h.length-1]:"";p=p.toLowerCase();var f=null,d=null,g=function(t,e){console.time("Upload to storage");var r=new XMLHttpRequest;r.open("PUT",t,!0),r.upload.onprogress=function(t){var e=100/c.length,r=e*u+t.loaded/t.total*e;n.set({progress:r})},r.onload=function(){console.timeEnd("Upload to storage"),y()},r.onerror=function(){window.hasOwnProperty("mediaCloudDirectUploadError")&&!1!==window.mediaCloudDirectUploadError||(window.mediaCloudDirectUploadError=!0,alert("There was an error uploading this item. The most likely cause is that you don't have CORS configured correctly on your bucket.")),console.timeEnd("Upload to storage"),n.uploadError()},r.send(e)},m=function(t,e){var o={action:"ilab_upload_prepare_next",key:t,type:r};n.hasOwnProperty("uploadDirectory")&&(o.directory=n.uploadDirectory),console.time("Getting upload URL"),jQuery.post(ajaxurl,o,(function(t){console.timeEnd("Getting upload URL"),t.hasOwnProperty("url")?g(t.url,e):n.uploadError()}))},y=function r(){if(++u>=c.length||-1===t.type.indexOf("image/")||1===c.length)n.uploadFinished(i.key,e,l);else{var h=c[u];if("full"!==h)if(mediaCloudDirectUploadSettings.generateThumbnails){var y=function(e){console.time("Resize JPEG image");var o=i.sizes[h],a=e.bitmap.width,u=e.bitmap.height;if(o.width>a&&o.height>u)r();else{if(o.crop)e.cover(o.width,o.height,Jimp.HORIZONTAL_ALIGN_CENTER|Jimp.VERTICAL_ALIGN_MIDDLE,Jimp.RESIZE_BEZIER);else{var c=n.sizeToFitSize(a,u,o.width,o.height);e.resize(c[0],c[1],Jimp.RESIZE_BEZIER)}var f=s+"-"+e.bitmap.width+"x"+e.bitmap.height+p;"image/jpeg"!==t.type&&"image/jpg"!==t.type||e.quality(mediaCloudDirectUploadSettings.imageQuality),console.timeEnd("Resize JPEG image"),console.time("Get JPEG buffer"),e.getBuffer(t.type,(function(r,o){if(console.timeEnd("Get JPEG buffer"),null!=r)n.uploadError();else{var i={size:h,key:f,mime:t.type,width:e.bitmap.width,height:e.bitmap.height};l.push(i);var a=new File([o],f,{type:t.type});m(f,a)}}))}},v=function(t){var e=i.sizes[h],o=t.width,a=t.height;if(e.width>o&&e.height>a)r();else if(e.crop){var u=n.sizeToFillSize(o,a,e.width,e.height),c=s+"-"+e.width+"x"+e.height+p,f=document.createElement("canvas");f.width=u[0],f.height=u[1];var d=f.getContext("2d",{alpha:!0});d.imageSmoothingEnabled=!0,d.imageSmoothingQuality="high",d.drawImage(t,0,0,u[0],u[1]);var g=document.createElement("canvas"),y=g.getContext("2d",{alpha:!0});g.width=e.width,g.height=e.height,y.drawImage(f,Math.floor(e.width/2-u[0]/2),Math.floor(e.height/2-u[1]/2)),g.toBlob((function(t){var r={size:h,key:c,mime:"image/png",width:e.width,height:e.height};l.push(r),m(c,t)}),"image/png")}else{var v=n.sizeToFitSize(o,a,e.width,e.height),w=s+"-"+v[0]+"x"+v[1]+p,E=document.createElement("canvas");E.width=v[0],E.height=v[1];var b=E.getContext("2d",{alpha:!0});b.imageSmoothingEnabled=!0,b.imageSmoothingQuality="high",b.drawImage(t,0,0,v[0],v[1]),E.toBlob((function(t){var r={size:h,key:w,mime:"image/png",width:e.width,height:e.height};l.push(r),m(w,t)}),"image/png")}};if("image/png"===t.type)if(null==d){var w=new FileReader;w.onload=function(){(d=new Image).onload=function(){v(d)},d.src=w.result},w.readAsDataURL(t)}else v(d);else if(null==f){var E=new FileReader;E.onload=a(o.a.mark((function t(){var e;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Jimp.decoders["image/jpeg"],Jimp.decoders["image/jpeg"]=function(t){return e(t,{maxMemoryUsageInMB:2048})},t.prev=2,t.next=5,Jimp.read(E.result);case 5:f=t.sent,y(f.clone()),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(2),alert("Insufficient memory to process image. Please resize before uploading again."),n.uploadError();case 13:case"end":return t.stop()}}),t,null,[[2,9]])}))),E.readAsArrayBuffer(t)}else y(f.clone())}else r();else g(i.url,t)}};-1===t.type.indexOf("image/")||1===c.length?g(i.url,t):y()}else n.uploadError()}.bind(this))},"undefined"!=typeof DirectUploadItem&&(DirectUploadItem.prototype.uploadToStorage=ILABUploadToOtherS3Storage),ilabMediaUploadItem.prototype.uploadToStorage=ILABUploadToOtherS3Storage},65:function(t,e,r){t.exports=r(113)}});
\ No newline at end of file
diff --git a/public/js/ilab-media-direct-upload-s3.js b/public/js/ilab-media-direct-upload-s3.js
index f4269b45..03a620de 100755
--- a/public/js/ilab-media-direct-upload-s3.js
+++ b/public/js/ilab-media-direct-upload-s3.js
@@ -1 +1 @@
-!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=628)}({113:function(e,t,r){var n=function(e){"use strict";var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function l(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),a=new b(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=w(a,r);if(l){if(l===u)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var h=c(e,t,r);if("normal"===h.type){if(n=r.done?"completed":"suspendedYield",h.arg===u)continue;return{value:h.arg,done:r.done}}"throw"===h.type&&(n="completed",r.method="throw",r.arg=h.arg)}}}(e,r,a),i}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function h(){}function s(){}function p(){}var d={};d[o]=function(){return this};var f=Object.getPrototypeOf,g=f&&f(f(L([])));g&&g!==t&&r.call(g,o)&&(d=g);var m=p.prototype=h.prototype=Object.create(d);function y(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function v(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,l){var u=c(e[o],e,i);if("throw"!==u.type){var h=u.arg,s=h.value;return s&&"object"==typeof s&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(s).then((function(e){h.value=e,a(h)}),(function(e){return n("throw",e,a,l)}))}l(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=c(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:L(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},628:function(e,t,r){e.exports=r(629)},629:function(e,t,r){"use strict";r.r(t);var n=r(65),o=r.n(n);function i(e,t,r,n,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,c,"next",e)}function c(e){i(a,n,o,l,c,"throw",e)}l(void 0)}))}}window.ILABUploadToS3Storage=function(e,t,r,n){var i={action:"ilab_upload_prepare",filename:e.name,type:r};n.hasOwnProperty("uploadDirectory")&&(i.directory=n.uploadDirectory),console.log("Getting upload URL ..."),console.time("Getting upload URL"),jQuery.post(ajaxurl,i,(function(i){if("ready"==i.status){console.timeEnd("Getting upload URL"),n.set({state:"uploading"});var l=-1,c=Object.keys(i.sizes),u=[],h=i.key.split("."),s=h.length>2?h.slice(0,h.length-1).join("."):h[0],p=h.length>1?"."+h[h.length-1]:"";p=p.toLowerCase();var d=function(t,o){console.log("Upload "+t);var a=new FormData;_.each(Object.keys(i.formData),(function(e){"key"!==e&&a.append(e,i.formData[e])})),null!=i.cacheControl&&i.cacheControl.length>0&&a.append("Cache-Control",i.cacheControl),null!=i.expires&&a.append("Expires",i.expires),a.append("Content-Type",r),a.append("acl",i.acl),a.append("key",t),a.append("file",o),console.time("Upload "+t),jQuery.ajax({url:i.url,method:"POST",contentType:!1,processData:!1,data:a,xhr:function(){var t=jQuery.ajaxSettings.xhr();return t.upload.onprogress=function(t){if(-1===e.type.indexOf("image/")||1===c.length){var r=t.loaded/t.total*100;n.set({progress:r})}else{var o=100/c.length,i=o*l+t.loaded/t.total*o;n.set({progress:i})}}.bind(this),t},success:function(){console.timeEnd("Upload "+t),m()},error:function(e){console.timeEnd("Upload "+t),window.hasOwnProperty("mediaCloudDirectUploadError")&&!1!==window.mediaCloudDirectUploadError||(window.mediaCloudDirectUploadError=!0,alert("There was an error uploading this item. The most likely cause is that you don't have CORS configured correctly on your bucket.")),n.uploadError()}})},f=null,g=null,m=function r(){if(console.log("Upload next size ..."),++l>=c.length||-1===e.type.indexOf("image/")||1===c.length)return console.log("finish upload"),void n.uploadFinished(i.key,t,u);var h=c[l];if("full"!==h)if(mediaCloudDirectUploadSettings.generateThumbnails){var m=function(t){var o=i.sizes[h],a=t.bitmap.width,l=t.bitmap.height;if(o.width>a&&o.height>l)r();else{if(console.log("Resizing JPEG file ..."),console.time("Resize JPEG image"),o.crop)t.cover(o.width,o.height,Jimp.HORIZONTAL_ALIGN_CENTER|Jimp.VERTICAL_ALIGN_MIDDLE,Jimp.RESIZE_BEZIER);else{var c=n.sizeToFitSize(a,l,o.width,o.height);t.resize(c[0],c[1],Jimp.RESIZE_BEZIER)}var f=s+"-"+t.bitmap.width+"x"+t.bitmap.height+p;"image/jpeg"!==e.type&&"image/jpg"!==e.type||t.quality(mediaCloudDirectUploadSettings.imageQuality),console.timeEnd("Resize JPEG image"),console.time("Get JPEG buffer"),t.getBuffer(e.type,(function(r,o){if(console.timeEnd("Get JPEG buffer"),null!=r)n.uploadError();else{var i={size:h,key:f,mime:e.type,width:t.bitmap.width,height:t.bitmap.height};u.push(i);var a=new File([o],f,{type:e.type});d(f,a)}}))}},y=function(e){var t=i.sizes[h],o=e.width,a=e.height;if(t.width>o&&t.height>a)r();else if(t.crop){var l=n.sizeToFillSize(o,a,t.width,t.height),c=s+"-"+t.width+"x"+t.height+p,f=document.createElement("canvas");f.width=l[0],f.height=l[1];var g=f.getContext("2d",{alpha:!0});g.imageSmoothingEnabled=!0,g.imageSmoothingQuality="high",g.drawImage(e,0,0,l[0],l[1]);var m=document.createElement("canvas"),y=m.getContext("2d",{alpha:!0});m.width=t.width,m.height=t.height,y.drawImage(f,Math.floor(t.width/2-l[0]/2),Math.floor(t.height/2-l[1]/2)),m.toBlob((function(e){var r={size:h,key:c,mime:"image/png",width:t.width,height:t.height};u.push(r),d(c,e)}),"image/png")}else{var v=n.sizeToFitSize(o,a,t.width,t.height),w=s+"-"+v[0]+"x"+v[1]+p,E=document.createElement("canvas");E.width=v[0],E.height=v[1];var x=E.getContext("2d",{alpha:!0});x.imageSmoothingEnabled=!0,x.imageSmoothingQuality="high",x.drawImage(e,0,0,v[0],v[1]),E.toBlob((function(e){var r={size:h,key:w,mime:"image/png",width:t.width,height:t.height};u.push(r),d(w,e)}),"image/png")}};if("image/png"===e.type)if(null==g){var v=new FileReader;v.onload=function(){(g=new Image).onload=function(){y(g)},g.src=v.result},v.readAsDataURL(e)}else y(g);else if(null==f){console.log("Reading JPEG file ...");var w=new FileReader;console.time("Read JPEG file"),w.onload=a(o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jimp.read(w.result);case 2:f=e.sent,console.timeEnd("Read JPEG file"),(f.bitmap.width>2560||f.bitmap.height>2560)&&(console.log("Resizing huge image ..."),console.time("Resizing huge image"),t=n.sizeToFitSize(f.bitmap.width,f.bitmap.height,2560,2560),f.resize(t[0],t[1],Jimp.RESIZE_BEZIER),console.timeEnd("Resizing huge image")),m(f.clone());case 6:case"end":return e.stop()}}),e)}))),w.readAsArrayBuffer(e)}else m(f.clone())}else r();else d(i.key,e)};-1===e.type.indexOf("image/")||1===c.length?d(i.key,e):m()}else n.uploadError()}))},"undefined"!=typeof DirectUploadItem&&(DirectUploadItem.prototype.uploadToStorage=ILABUploadToS3Storage),ilabMediaUploadItem.prototype.uploadToStorage=ILABUploadToS3Storage},65:function(e,t,r){e.exports=r(113)}});
\ No newline at end of file
+!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=628)}({113:function(e,t,r){var n=function(e){"use strict";var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function l(e,t,r,n){var o=t&&t.prototype instanceof s?t:s,i=Object.create(o.prototype),a=new b(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=w(a,r);if(l){if(l===u)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===u)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(e,r,a),i}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function s(){}function h(){}function p(){}var d={};d[o]=function(){return this};var f=Object.getPrototypeOf,g=f&&f(f(L([])));g&&g!==t&&r.call(g,o)&&(d=g);var m=p.prototype=s.prototype=Object.create(d);function y(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function v(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,l){var u=c(e[o],e,i);if("throw"!==u.type){var s=u.arg,h=s.value;return h&&"object"==typeof h&&r.call(h,"__await")?t.resolve(h.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(h).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,l)}))}l(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=c(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;x(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:L(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},628:function(e,t,r){e.exports=r(629)},629:function(e,t,r){"use strict";r.r(t);var n=r(65),o=r.n(n);function i(e,t,r,n,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,c,"next",e)}function c(e){i(a,n,o,l,c,"throw",e)}l(void 0)}))}}window.ILABUploadToS3Storage=function(e,t,r,n){var i={action:"ilab_upload_prepare",filename:e.name,type:r};n.hasOwnProperty("uploadDirectory")&&(i.directory=n.uploadDirectory),console.log("Getting upload URL ..."),console.time("Getting upload URL"),jQuery.post(ajaxurl,i,(function(i){if("ready"==i.status){console.timeEnd("Getting upload URL"),n.set({state:"uploading"});var l=-1,c=Object.keys(i.sizes),u=[],s=i.key.split("."),h=s.length>2?s.slice(0,s.length-1).join("."):s[0],p=s.length>1?"."+s[s.length-1]:"";p=p.toLowerCase();var d=function(t,o){console.log("Upload "+t);var a=new FormData;_.each(Object.keys(i.formData),(function(e){"key"!==e&&a.append(e,i.formData[e])})),null!=i.cacheControl&&i.cacheControl.length>0&&a.append("Cache-Control",i.cacheControl),null!=i.expires&&a.append("Expires",i.expires),a.append("Content-Type",r),a.append("acl",i.acl),a.append("key",t),a.append("file",o),console.time("Upload "+t),jQuery.ajax({url:i.url,method:"POST",contentType:!1,processData:!1,data:a,xhr:function(){var t=jQuery.ajaxSettings.xhr();return t.upload.onprogress=function(t){if(-1===e.type.indexOf("image/")||1===c.length){var r=t.loaded/t.total*100;n.set({progress:r})}else{var o=100/c.length,i=o*l+t.loaded/t.total*o;n.set({progress:i})}}.bind(this),t},success:function(){console.timeEnd("Upload "+t),m()},error:function(e){console.timeEnd("Upload "+t),window.hasOwnProperty("mediaCloudDirectUploadError")&&!1!==window.mediaCloudDirectUploadError||(window.mediaCloudDirectUploadError=!0,alert("There was an error uploading this item. The most likely cause is that you don't have CORS configured correctly on your bucket.")),n.uploadError()}})},f=null,g=null,m=function r(){if(console.log("Upload next size ..."),++l>=c.length||-1===e.type.indexOf("image/")||1===c.length)return console.log("finish upload"),void n.uploadFinished(i.key,t,u);var s=c[l];if("full"!==s)if(mediaCloudDirectUploadSettings.generateThumbnails){var m=function(t){var o=i.sizes[s],a=t.bitmap.width,l=t.bitmap.height;if(o.width>a&&o.height>l)r();else{if(console.log("Resizing JPEG file ..."),console.time("Resize JPEG image"),o.crop)t.cover(o.width,o.height,Jimp.HORIZONTAL_ALIGN_CENTER|Jimp.VERTICAL_ALIGN_MIDDLE,Jimp.RESIZE_BEZIER);else{var c=n.sizeToFitSize(a,l,o.width,o.height);t.resize(c[0],c[1],Jimp.RESIZE_BEZIER)}var f=h+"-"+t.bitmap.width+"x"+t.bitmap.height+p;"image/jpeg"!==e.type&&"image/jpg"!==e.type||t.quality(mediaCloudDirectUploadSettings.imageQuality),console.timeEnd("Resize JPEG image"),console.time("Get JPEG buffer"),t.getBuffer(e.type,(function(r,o){if(console.timeEnd("Get JPEG buffer"),null!=r)n.uploadError();else{var i={size:s,key:f,mime:e.type,width:t.bitmap.width,height:t.bitmap.height};u.push(i);var a=new File([o],f,{type:e.type});d(f,a)}}))}},y=function(e){var t=i.sizes[s],o=e.width,a=e.height;if(t.width>o&&t.height>a)r();else if(t.crop){var l=n.sizeToFillSize(o,a,t.width,t.height),c=h+"-"+t.width+"x"+t.height+p,f=document.createElement("canvas");f.width=l[0],f.height=l[1];var g=f.getContext("2d",{alpha:!0});g.imageSmoothingEnabled=!0,g.imageSmoothingQuality="high",g.drawImage(e,0,0,l[0],l[1]);var m=document.createElement("canvas"),y=m.getContext("2d",{alpha:!0});m.width=t.width,m.height=t.height,y.drawImage(f,Math.floor(t.width/2-l[0]/2),Math.floor(t.height/2-l[1]/2)),m.toBlob((function(e){var r={size:s,key:c,mime:"image/png",width:t.width,height:t.height};u.push(r),d(c,e)}),"image/png")}else{var v=n.sizeToFitSize(o,a,t.width,t.height),w=h+"-"+v[0]+"x"+v[1]+p,E=document.createElement("canvas");E.width=v[0],E.height=v[1];var x=E.getContext("2d",{alpha:!0});x.imageSmoothingEnabled=!0,x.imageSmoothingQuality="high",x.drawImage(e,0,0,v[0],v[1]),E.toBlob((function(e){var r={size:s,key:w,mime:"image/png",width:t.width,height:t.height};u.push(r),d(w,e)}),"image/png")}};if("image/png"===e.type)if(null==g){var v=new FileReader;v.onload=function(){(g=new Image).onload=function(){y(g)},g.src=v.result},v.readAsDataURL(e)}else y(g);else if(null==f){console.log("Reading JPEG file ...");var w=new FileReader;console.time("Read JPEG file"),w.onload=a(o.a.mark((function e(){var t,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Jimp.decoders["image/jpeg"],Jimp.decoders["image/jpeg"]=function(e){return t(e,{maxMemoryUsageInMB:2048})},e.prev=2,e.next=5,Jimp.read(w.result);case 5:f=e.sent,console.timeEnd("Read JPEG file"),(f.bitmap.width>2560||f.bitmap.height>2560)&&(console.log("Resizing huge image ..."),console.time("Resizing huge image"),r=n.sizeToFitSize(f.bitmap.width,f.bitmap.height,2560,2560),f.resize(r[0],r[1],Jimp.RESIZE_BEZIER),console.timeEnd("Resizing huge image")),m(f.clone()),e.next=15;break;case 11:e.prev=11,e.t0=e.catch(2),alert("Insufficient memory to process image. Please resize before uploading again."),n.uploadError();case 15:case"end":return e.stop()}}),e,null,[[2,11]])}))),w.readAsArrayBuffer(e)}else m(f.clone())}else r();else d(i.key,e)};-1===e.type.indexOf("image/")||1===c.length?d(i.key,e):m()}else n.uploadError()}))},"undefined"!=typeof DirectUploadItem&&(DirectUploadItem.prototype.uploadToStorage=ILABUploadToS3Storage),ilabMediaUploadItem.prototype.uploadToStorage=ILABUploadToS3Storage},65:function(e,t,r){e.exports=r(113)}});
\ No newline at end of file
diff --git a/readme.txt b/readme.txt
index 03eac7d9..5e2b295d 100755
--- a/readme.txt
+++ b/readme.txt
@@ -5,7 +5,7 @@ Requires at least: 4.9
Tested up to: 5.6.1
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
-Stable tag: 4.2.3
+Stable tag: 4.2.6
Requires PHP: 7.1
Automatically store media on Amazon S3, Google Cloud Storage, DigitalOcean Spaces + others. Serve CSS/JS assets through CDNs. Integrate with Imgix.
@@ -105,8 +105,18 @@ Imgix is a content delivery network with a twist. In addition to distributing y
== Changelog ==
-= 4.2.3 =
+= 4.2.6 =
+* Fixes for direct uploads for huge image files
+* Fix for hyperdb not storing null values
+* Fix for support links
+* Fixes for migrate task
+* Updated to latest Freemius SDK
+
+
+= 4.2.5 =
+
+* Fixes for migration task
* Fix redeclared function error when using as a composer dependency
* Fix for bug introduced 4.2.2
* Fix for PHP 7.4 type errors