Function to apply external image with $post_id and $image_url

[ad_1]

Hi,

I have a content aggregator and use WP Webhooks along with a custom built workflow using n8n to import articles. Right now, I don’t handle featured images as I did at one point and my media library grew out of hand. As an alternative, this plugin looks like it would work, but I just want to understand something really quick.

From browsing your code, which looks great by the way, it looks like I would just need to call “fifu_dev_set_image” after creating the post and pass in the $post_id along with the external $image_url and then your plugin would be able to handle the rest. Is that a correct assumption?

Thank you,
AJ

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer