what functions to use to resize images and create DB metadata for them after/during upload?


I am working on my first script to create a WP post with images and upload those images to the uploads folder.

I am clear about wp_insert_post and was able to upload an image to the server with wp_handle_upload, but what do I do after it’s uploaded to create all its resized versions (for responsive design) and add all the relevant metadata info to the database?

Also do I need wp_media_upload_handler (since it takes no parameters) and, if so, how/when do I run that in relation to wp_handle_upload?

, , , marcnyc 3 years 2020-06-02T08:11:12-05:00 0 Answers 97 views 0

Leave an answer