File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,12 +71,12 @@ private static function wpdb_retrieve_images_and_metadata( $start_id ) {
7171 $ wpdb ->posts .ID,
7272 $ wpdb ->posts .post_title,
7373 $ wpdb ->postmeta .meta_value,
74- wp_postmeta_file.meta_value AS unique_attachment_name,
7574 wp_postmeta_tiny.meta_value AS tiny_meta_value
7675 FROM $ wpdb ->posts
77- LEFT JOIN $ wpdb ->postmeta
76+ INNER JOIN $ wpdb ->postmeta
7877 ON $ wpdb ->posts .ID = $ wpdb ->postmeta .post_id
79- LEFT JOIN $ wpdb ->postmeta AS wp_postmeta_file
78+ AND $ wpdb ->postmeta .meta_key = '_wp_attachment_metadata'
79+ INNER JOIN $ wpdb ->postmeta AS wp_postmeta_file
8080 ON $ wpdb ->posts .ID = wp_postmeta_file.post_id
8181 AND wp_postmeta_file.meta_key = '_wp_attached_file'
8282 LEFT JOIN $ wpdb ->postmeta AS wp_postmeta_tiny
@@ -90,8 +90,6 @@ private static function wpdb_retrieve_images_and_metadata( $start_id ) {
9090 $ wpdb ->posts .post_mime_type = 'image/png' OR
9191 $ wpdb ->posts .post_mime_type = 'image/webp'
9292 )
93- AND $ wpdb ->postmeta .meta_key = '_wp_attachment_metadata'
94- GROUP BY unique_attachment_name
9593 ORDER BY ID DESC
9694 LIMIT " . self ::PAGING_SIZE ;
9795
You can’t perform that action at this time.
0 commit comments