Hi @johndbb!
This is Joseph from Imagify, and I’ll gladly assist you here!
When you are viewing pages related to Imagify such as the Media Library, Imagify counts the number of optimized and unoptimized images you have. In most cases there’s no issue, but we have seen a few instances where a high optimized image count slow the loading of the page down.
As a way to resolve this, you could try adding the following code to your theme’s functions.php file:
function pfx_limit_imagify_optimize_count( $count ) {
return 1;
}
add_filter( 'imagify_count_optimized_attachments', 'pfx_limit_imagify_optimize_count' );
add_filter( 'imagify_count_attachments', 'pfx_limit_imagify_optimize_count' );
add_filter( 'imagify_count_unoptimized_attachments', 'pfx_limit_imagify_optimize_count' );
add_filter( 'imagify_count_saving_data', 'pfx_limit_imagify_optimize_count' );
add_filter( 'imagify_count_error_attachments', 'pfx_limit_imagify_optimize_count' );
If this is the reason for your issue, this code limits the counting to just a single image for each page load, so it may help improve things for you.
After adding this code, you’ll notice that optimization filter numbers (Optimized, Unoptimized, Error) will likely be incorrect in the Media Library page, but this should not affect optimization of your images and you’ll still be able to filter images in the Media Library under the categories of Optimized, Unoptimized, and Error.
Please let me know how this works for you, and I am happy to continue assisting any way I can!
Best regards,
Joseph