It’s not as simple as other text based fields!
You need to search for a pre-made upload class. Just Google: PHP uploader and implement it in your PHP code.
If it’s all backend you can use WP image uploader:
http://mikejolley.com/2012/12/using-the-new-wordpress-3-5-media-uploader-in-plugins/
Have you tried using wp_handle_sideload()? The documentation is sparse, you can learn more by studying the source code.
Be very careful from whom, where, and what you allow to be uploaded. Many sites have been hacked by allowing indiscriminate uploads. And some thought they were being careful but were not devious enough to see the hole in their security.
Thanks.
I’ll check out the Mike Jolly media uploader post – but I am looking for a front-end solution for a custom profile page… so we’ll see.
Sideload() looks promising – not much documentation, but this could lead me to where I need to be:
http://wordpress.stackexchange.com/questions/34730/uploading-images-to-media-library-via-wp-handle-sideload-fails
This has been informative:
http://ww.wp.xz.cn/support/topic/plugin-user-photo-front-end-upload?replies=17
As well as this:
http://wordpress.stackexchange.com/questions/4307/how-can-i-add-an-image-upload-field-directly-to-a-custom-write-panel/4413#4413
I use theme-my-login to password protect the entire site. Nothing should be accessible to any external user who is not logged in. External registration is not permitted – this is a closed-off site.
Once I get this working, I’ll post the results here and mark as solved. Ideally, if an image is uploaded for the user, the image will be displayed (and resized proportionally). The upload object should be a simple directory box with a ‘Browse’ button next to it that opens an old fashioned file upload box (only permitting image file types).
Thanks for your help. I’ll post back soon!