diff --git a/classes/Tools/Storage/StorageImageEditor.php b/classes/Tools/Storage/StorageImageEditor.php index f89afc60..2e70676a 100644 --- a/classes/Tools/Storage/StorageImageEditor.php +++ b/classes/Tools/Storage/StorageImageEditor.php @@ -283,8 +283,12 @@ public function save( $destfilename = null, $mime_type = null ) { } else { $dir = wp_get_upload_dir(); - if (strpos($destfilename, $dir['basedir']) !== 0) { + if (strpos($destfilename, ABSPATH) !== 0) { $destfilename = trailingslashit($dir['basedir']).$destfilename; + $destPath = pathinfo($destfilename, PATHINFO_DIRNAME); + if (!file_exists($destPath)) { + @mkdir($destPath, 0777, true); + } } $result = $this->imageEditor->save($destfilename, $mime_type); diff --git a/ilab-media-tools.php b/ilab-media-tools.php index 0e916456..74fc0529 100644 --- 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.5.10 +Version: 4.5.11 Requires PHP: 7.4 Author URI: http://interfacelab.io */ @@ -95,7 +95,7 @@ } // Version Defines -define( 'MEDIA_CLOUD_VERSION', '4.5.10' ); +define( 'MEDIA_CLOUD_VERSION', '4.5.11' ); define( 'MEDIA_CLOUD_INFO_VERSION', '4.0.2' ); define( 'MCLOUD_IS_BETA', false ); // Debugging diff --git a/readme.txt b/readme.txt index 8408f974..1bb62631 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Requires at least: 4.9 Tested up to: 6.1 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html -Stable tag: 4.5.10 +Stable tag: 4.5.11 Requires PHP: 7.4 Automatically store media on Amazon S3, Cloudflare R2, Google Cloud Storage, DigitalOcean Spaces + others. Serve CSS/JS assets through CDNs. Integrate with Imgix. @@ -105,6 +105,12 @@ Imgix is a content delivery network with a twist. In addition to distributing y == Changelog == += 4.5.11 - 11/09/2022 = + +* Fix for StorageImageEditor class that should improve compatibility with other plugins using the image editor but + storing the results in non-standard places. Should fix problems with a variety of form and social plugins (Gravity, + Peepso, others). + = 4.5.10 - 11/09/2022 = * Fix for broken Crop, Edit Image and Replace Image buttons in the media library.