You found the right image for a post, and it is sitting at some URL. The manual version is download, rename, upload through the media library, then open the post and set the featured image. Four steps and a browser tab shuffle for one picture.
Here the agent does the fetching and the busywork, and you keep the one decision that matters: yes, use this image on this post. It is a write, so it waits for that yes before anything lands.
Set the featured image on [post ID 142] from this image URL:[https://example.com/photo.jpg]. Fetch the image yourself and read itas base64, since the upload takes image data, not a link. It has to bea jpg, png, gif, or webp. Before you upload, show me the source URL,the file format, and the post it will go on, and wait for my go-ahead.Once I approve, upload it to the media library and set it as thatpost's featured image, then tell me the new attachment ID.Why this is safe to run
There are two writes here and both are narrow. The upload adds one new image to the media library, and setting the featured image points one post at that attachment. Neither touches the post body, its status, or anything already in your library.
The format rule does real work. Because upload-media takes base64 and accepts only jpg, png, gif, and webp, the agent has to fetch the URL and convert it before the plugin will look at it, and the plugin validates the bytes it receives rather than trusting a link. An SVG or an unrecognized format is rejected outright, so nothing questionable gets stored. On top of that, the write abilities stay off until you enable them, every call is checked against the capability of the user you bound the agent to, and the upload and the featured-image change both land in the Activity Log. If you set the wrong image, you change the featured image back, and the post copy is never affected.
Already connected? You do not have to paste this. Ask your agent for the “set a featured image from a URL” recipe, or just point it at an image and a post, and it runs the same fetch, upload, and approval flow on your own site.