Smush Pro on image sizes manually added

I have written an "on-the-fly" image resizer to create images at any size I want throughout the theme. This is to prevent clogging up the server with hundreds of images at the size I don't need, which happens when you use add_image_size

This function calls wp_update_attachment_metadata() which then freezes the website for a good 60 seconds as ALL the images are re-smushed. Not good.

So I disable auto smushing but then smushing in the media library ignores all my newly created files and only updates image sizes known to the site.

Is there any way to make bulk smushing / smushing in the media library look at the image meta for each image, find sizes listed there that are not in the main site, and smush those?

Otherwise the plugin doesn't affect my images at all :slight_frown:

Thanks
Shaun