This sql, fetches ALL images.
On sites with 100.000 images, this will properbly die.
|
$query = "SELECT $wpdb->posts.ID, $wpdb->posts.post_title, $wpdb->posts.post_mime_type |
|
FROM $wpdb->posts, $wpdb->postmeta |
|
WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id |
|
AND $wpdb->posts.post_type = 'attachment' |
|
AND $wpdb->posts.post_mime_type LIKE 'image/%' |
|
AND $queryImageTypes |
|
AND $wpdb->postmeta.meta_key = '_wp_attachment_metadata' |
|
AND $wpdb->postmeta.meta_value NOT LIKE '$optimus_query' |
|
$id_query |
|
ORDER BY $wpdb->posts.ID DESC"; |
|
|
|
return $wpdb->get_results($query, ARRAY_A); |
We try to run some re-creating of .webp Images, but we suspect this one to be the root cause of why its not possible.
We do it via WP CLi, and the above sql, doesnt use LIMIT params, in order to listen on how many it should fetch.
This sql, fetches ALL images.
On sites with 100.000 images, this will properbly die.
optimus/inc/optimus_management.class.php
Lines 101 to 112 in 3b830e4
We try to run some re-creating of .webp Images, but we suspect this one to be the root cause of why its not possible.
We do it via WP CLi, and the above sql, doesnt use LIMIT params, in order to listen on how many it should fetch.