Hey there!
I think you meant “Unable to load the metadata for this attachment.”, right?
Were your images uploaded through WP-admin using the core functions? I ask you because probably the reason is that your attachments doesn’t have metadata (you can get the ID of your attachments, and check the _wp_attachment_metadata
in the {PREFIX}_postmeta
table).
I tried to remove it, but if it doesn’t exist, it should also be re-created while regenerating. For some reason it’s not working for you. Are you able to debug the code to understand what’s happening? You could also try to disable other plugins or your theme, and try again (re-uploading a new attachment) to test.
It’s probably where the error is happening: https://github.com/Automattic/regenerate-thumbnails/blob/master/includes/class-regeneratethumbnails-regenerator.php#L571
And here is where the meta should be created if it doesn’t exist: https://github.com/Automattic/regenerate-thumbnails/blob/master/includes/class-regeneratethumbnails-regenerator.php#L193
I hope it helps you!