diff --git a/composer.lock b/composer.lock index 595bf547..b8b2f0c5 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "codeinwp/optimole-sdk", - "version": "v1.2.2", + "version": "v1.2.3", "source": { "type": "git", "url": "https://github.com/Codeinwp/optimole-php-sdk.git", - "reference": "567557f1067c934a564154dd292a3f343749b538" + "reference": "901d1f2223df875f8ea65998a76049b0341f8dd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeinwp/optimole-php-sdk/zipball/567557f1067c934a564154dd292a3f343749b538", - "reference": "567557f1067c934a564154dd292a3f343749b538", + "url": "https://api.github.com/repos/Codeinwp/optimole-php-sdk/zipball/901d1f2223df875f8ea65998a76049b0341f8dd7", + "reference": "901d1f2223df875f8ea65998a76049b0341f8dd7", "shasum": "" }, "require": { @@ -60,7 +60,7 @@ "issues": "https://github.com/Codeinwp/codeinwp/optimole-php-sdk/issues", "source": "https://github.com/Codeinwp/optimole-php-sdk" }, - "time": "2025-03-28T18:31:54+00:00" + "time": "2025-10-15T19:48:30+00:00" }, { "name": "codeinwp/themeisle-sdk", diff --git a/inc/url_replacer.php b/inc/url_replacer.php index f74ebed3..f6eca2a4 100644 --- a/inc/url_replacer.php +++ b/inc/url_replacer.php @@ -267,6 +267,9 @@ private function normalize_image( $url, $original_url, $args, $is_uploaded = fal if ( ! empty( $args['resize'] ) ) { $this->apply_resize( $image, $args['resize'] ); + } elseif ( $this->settings->is_smart_cropping() ) { + // If smart cropping is enabled and no resize is set, we apply smart focus since the resize can be triggered from the JS library. + $image->smartFocus(); } if ( apply_filters( 'optml_apply_watermark_for', true, $url ) ) {