Support

Account

Home Forums Add-ons Gallery Field meta_input wp_insert_post acf gallery Reply To: meta_input wp_insert_post acf gallery

  • if the image has a URL then you can use https://developer.wordpress.org/reference/functions/media_sideload_image/

    If this is not the case then you would need to get the image file from $_FILES in PHP and manually add them to the image folder. https://rudrastyh.com/wordpress/how-to-add-images-to-media-library-from-uploaded-files-programmatically.html