Skip to content

Commit df533af

Browse files
authored
release: fixes
- Remove redundant error log messages - Fix Smart Crop persistence on auto resize images.
2 parents 46012ee + 7112d8b commit df533af

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

composer.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inc/lazyload_replacer.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,6 @@ public function get_svg_for( $width, $height, $url = null ) {
524524
$filepath = WP_CONTENT_DIR . $filepath;
525525
if ( is_file( $filepath ) ) {
526526
$sizes = getimagesize( $filepath );
527-
error_log( 'get_svg_for: ' . var_export( $sizes, true ) . ' ' . $url );
528527
wp_cache_add( $key, [ $sizes[0], $sizes[1] ], 'optml_sources', DAY_IN_SECONDS );
529528
}
530529
}

inc/url_replacer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ private function normalize_image( $url, $original_url, $args, $is_uploaded = fal
267267

268268
if ( ! empty( $args['resize'] ) ) {
269269
$this->apply_resize( $image, $args['resize'] );
270+
} elseif ( $this->settings->is_smart_cropping() ) {
271+
// If smart cropping is enabled and no resize is set, we apply smart focus since the resize can be triggered from the JS library.
272+
$image->smartFocus();
270273
}
271274

272275
if ( apply_filters( 'optml_apply_watermark_for', true, $url ) ) {

0 commit comments

Comments
 (0)