Ran into a similar problem after installing this otherwise very handy plugin. The 1×1 pixel dimensions are the result of missing metadata in the wp_postmeta table for the attachment.
This plugin hooks into the wp_update_attachment_metadata filter at line 156 of class-original-image-handler.php in the plugin folder:
add_filter( 'wp_update_attachment_metadata', array( $this, 'update_uploaded_count' ), 10, 2 );
The ‘update_uploaded_count’ function updates the database with metrics about how much storage space has been optimized. Unfortunately, it doesn’t return the $data array back to wp_update_attachment_metadata which in turn prevents the _wp_attachment_metadata record from being created in the wp_postmeta table. Without the metadata record available, WordPress can’t retrieve image dimensions for any of the asset sizes.
Additionally, the function parameters passed to the function were in reverse order. The correct order is ($data, $post_id).
The function with modification should read:
public function update_uploaded_count( $data, $post_id ) { /* order of variables was reversed: previously ($post_id,$data) */
if ( ! isset( $_REQUEST['history'] ) ) {
$new_files_size = 0;
$uploads_dir = wp_upload_dir();
if ( ! empty( $data['sizes'] ) && is_array( $data['sizes'] ) ) {
foreach( $data['sizes'] as $size => $values ) {
$file = trailingslashit( $uploads_dir['path'] ) . $values['file'];
if ( file_exists( $file ) && 'image' == substr( $values['mime-type'], 0, strlen( 'image' ) ) ) {
$new_files_size += filesize( $file );
}
}
}
$file = trailingslashit( $uploads_dir['basedir'] ) . $data['file'];
if ( file_exists( $file ) ) {
$new_files_size += filesize( $file );
}
update_option( 'oih_uploaded_size', $this->uploaded_size + $new_files_size );
}
/* This next step is VERY important: we need to return the data! Otherwise, wp_update_attachment_metadata is left with an empty data set and fails to create the _wp_attachment_metadata record in the wp_postmeta table, which is used by image rendering functions to display images throughout WP (backend and frontend). */
return $data;
}
After correcting for the errors in this function, my uploads were correctly generating metadata again, and I could see my thumbnails in media grid & full size images in the attachment page as expected.
Hope this helps.