I want to add post meta for picture thum during submit for revision

If you look at your current setup, you can see that your add_image_to_save_post function is fired off when wp_insert_post is performed.

wp_insert_post is fired off when a post is inserted into the database, and as you may know, as soon as you click “Add New” in WordPress a database entry is created, thus pulling on your hook.

What happens next is $title = $_POST['post_title'];, and yet there is no post_title, so getGoogleImg() is called with NULL, thus, I assume that the $web_page is not populated with what you would expect.

WordPress offers a set of actions that are useful when a post is saved, edited and even has its status changed. In your case, posts are premoderated for users, meaning that they cannot publish and can only set the status to pending. And there are actions for status changes: draft_to_pending, draft_to_publish, pending_to_publish, publish_to_private, etc. its always in the form of status_to_status.

So hopefully, changing the hook to fire off on draft_to_pending will solve your problem.

And on a completely different note, it’s not good to use non-validated user-input from $_POST['post_title'], who knows what kind of things the user will write there, and will result in directory-traversal and XSS in your case. So try to grab it from the post instead, you have the $post_ID, get it using get_post($post_ID) and then grab its post_title from there.

Hope this helped.