Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 82367

Simple Single Image Front-end Upload

$
0
0

Replies: 0

I am sorry that this question may seem similar to so many others, but I have yet to find post on here that matches my specific needs.

I am trying to allow users of my WordPress website to have profile pictures, without using Gravatar. A default image should be set when a user registers.

My profile page is generated via php functions, as a response to a shortcode. When a user is viewing their own profile, the picture should show, and a button below it that allows them to change this picture.

I would like to use the WP media uploader, but this seems to always provide access to all files that have been uploaded to the site. I only want the user to have the ability to upload one picture.

The way I see this working is to add a user_meta db entry called “website_profile_image_url”, and have this point to the url of the file that was uploaded.

I have tried many plugins to achieve this, but most seem to attach the url to a post, or to a page template, or some other location that does not make sense with the design of the website.

I just need a clean and simple solution that saves the picture with the others in the media library, and fills a hidden html field with the url of the uploaded picture.

Any guidance on how to develop a custom html/css/php/javascript solution would be greatly appreciated. Digging through themes and other plugins has not been much help in deciphering how to achieve this.


Viewing all articles
Browse latest Browse all 82367

Latest Images

Trending Articles



Latest Images