Skip to content

Commit

Permalink
Merge branch 'main' into 116-fix-image-size
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Mar 7, 2024
2 parents 2a59fca + 0a79826 commit 38cf73a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Media_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,12 +630,6 @@ private function process_regeneration( $id, $skip_delete, $only_missing, $image_
}

$metadata = wp_generate_attachment_metadata( $id, $fullsizepath );
if ( is_wp_error( $metadata ) ) {
WP_CLI::warning( sprintf( '%s (ID %d)', $metadata->get_error_message(), $id ) );
WP_CLI::log( "$progress Couldn't regenerate thumbnails for $att_desc." );
++$errors;
return;
}

// Note it's possible for no metadata to be generated for PDFs if restricted to a specific image size.
if ( empty( $metadata ) && ! ( $is_pdf && $image_size ) ) {
Expand Down

0 comments on commit 38cf73a

Please sign in to comment.