[PATCH] Skips PDF attachments ‘fullsize image file cannot be found’
-
If PDF thumbnails are not generated for any reason, you can select the attachments in the Media Library and apply Regenerate Thumbnails, but it fails with
Skipped Attachment ID nnnn (filename): The fullsize image file cannot be found in your uploads directory at . Without it, new thumbnail images can't be generated.
Looks like this was introduced in 3.1.2, as wp_get_original_image_path() returns NULL for non-image attachments. A patch to fix is:
--- wp-content/plugins/regenerate-thumbnails/includes/class-regeneratethumbnails-regenerator.php-orig 2024-06-14 21:58:34.509349816 +0100
+++ wp-content/plugins/regenerate-thumbnails/includes/class-regeneratethumbnails-regenerator.php 2024-06-15 07:05:52.566554398 +0100
@@ -138,7 +138,8 @@
if ( function_exists( 'wp_get_original_image_path' ) ) {
$this->fullsizepath = wp_get_original_image_path( $this->attachment->ID );
- } else {
+ }
+ if ( ! $this->fullsizepath ) {
$this->fullsizepath = get_attached_file( $this->attachment->ID );
}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.