Is there a hook / action that is triggered when adding or removing a post thumbnail?
I think you want to use the added_post_meta hook instead of updated_post_meta because you’re not updating the meta here, only adding it. At least in the case of the _thumbnail_id, where we must delete it before adding it again (no update) through the admin UI. Investigating this further we see that this part of the … Read more