diff --git a/includes/class-simple-local-avatars.php b/includes/class-simple-local-avatars.php index 14dacc2..6bb785d 100644 --- a/includes/class-simple-local-avatars.php +++ b/includes/class-simple-local-avatars.php @@ -438,7 +438,7 @@ public function get_simple_local_avatar_url( $id_or_email, $size ) { $editor = wp_get_image_editor( $avatar_full_path ); if ( ! is_wp_error( $editor ) ) { $image_size = $editor->get_size(); - if ( $image_size['width'] !== $size || $image_size['height'] !== $size ) { + if ( ! $image_size || $image_size['width'] !== $size || $image_size['height'] !== $size ) { $resized = $editor->resize( $size, $size, true ); if ( ! is_wp_error( $resized ) ) { $dest_file = $editor->generate_filename();