Title: [Plugin: Add Local Avatar] problems with directory path
Last modified: August 19, 2016

---

# [Plugin: Add Local Avatar] problems with directory path

 *  [gaidin](https://wordpress.org/support/users/gaidin/)
 * (@gaidin)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/)
 * I just upgrade to 7.5 of **Add-local-avatars**; with the change in DOCUMENT ROOT
   setting, which resolved a problem I was having with entering the path to the 
   avatar folder (where local avatar images are stored). Now by setting the path
   to _/public\_html/avatars_ users can upload their own avatars without any ‘directory
   not exist error’. The trouble is while the image files are successfully uploaded
   they won’t display. After some checking this is what I found:
 * _/public\_html/avatars_ works fine as the upload path.
 * the avatar path shown beside each userID assumes that the location of the WORDPRESS
   installation is the root, therefore _/public\_html/avatars/user.img_ won’t work.
 * if I edit the path for each user to _/avatars/user.img_ then the avatar displays
   fine.
 * On many hosting servers PUBLIC_HTML is your root (and where I installed WordPress)
 * Is there any easy way to fix this? Without having to edit the path for each user
   everytime the upload an avatar?

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [peterwsterling](https://wordpress.org/support/users/peterwsterling/)
 * (@peterwsterling)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327805)
 * Yes, it’s obvious really, you’ve almost answered your own question – set the 
   Avatar upload path option to /public_html/avatar
 *  Thread Starter [gaidin](https://wordpress.org/support/users/gaidin/)
 * (@gaidin)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327812)
 * Hi peter
 * That is exactly what I did. When I do that avatars are successfully uploaded 
   but wont display unless I then go to the user-list and edit the image path to_/
   avatar/user.img_
 * so this works for uploading but not for displaying: _/public\_html/avatar_
 * and this works fine for displaying but wont allow uploading: _/avatar_
 *  [bidiman](https://wordpress.org/support/users/bidiman/)
 * (@bidiman)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327813)
 * Same Problem here !
    since the new release, There is a problem between the upload
   path and the display path
 * because the upload path is [http://mydomain/www/avatars](http://mydomain/www/avatars)
 * but the display directory needs to be [http://mydomain/avatars](http://mydomain/avatars)
 * Please need a fix!
 * thank you
 *  [peterwsterling](https://wordpress.org/support/users/peterwsterling/)
 * (@peterwsterling)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327816)
 * If this used to work for you, try checking the legacy v7.3 option…
 *  [bidiman](https://wordpress.org/support/users/bidiman/)
 * (@bidiman)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327818)
 * Where can we find previous releaser and then.. de 7.3
 * Thanks
 *  Thread Starter [gaidin](https://wordpress.org/support/users/gaidin/)
 * (@gaidin)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327820)
 * Hi Peter
 * The legacy method of declaring the avatar folder did not work for me (got directory
   dont exist error).
 * I had contacted you a number of times with that issue and sent you a screenshots
   to see if I was doing something wrong.
 *  [kingwm](https://wordpress.org/support/users/kingwm/)
 * (@kingwm)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327851)
 * Using WP 2.9.1 and Avatar Options 7.5, it finally worked. I guess I just finally
   got the combination correct. Now, what gaidin posted makes sense.
 * My WP installation is not in the root server directory. I have several websites
   and this site is an addon, so it is in a separate folder in the root directory.
 * For the install folder, I used /mywebsitedirectory/avatars
    Then upload went 
   okay, but I had to remove the “mywebsitedirectory” from the “local” address in
   the user list. It appears to be working now. Only problem is, my users will not
   be able to make that change on their own. This means that the avatars they upload
   will not work until I “fix” it for them, which could deter their use of this 
   function all together.
 * I just double checked and it works like it should. I am excited, as I think this
   is a great plugin, and am optimistic for future possibilities.
 *  [kingwm](https://wordpress.org/support/users/kingwm/)
 * (@kingwm)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327852)
 * I just saw the “Or, use legacy (v7.3 and lower) $_SERVER[‘DOCUMENT_ROOT’]” option
   in the options screen, and the issue went away completely. Sorry for missing 
   that the first time.
 *  [decadence](https://wordpress.org/support/users/decadence/)
 * (@decadence)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327854)
 * Had the same problem but I find my solution!
    Because $_SERVER[‘DOCUMENT_ROOT’]
   is not suitable for my hosting (it linked to Apache root /usr/local/apache/htdocs)
   So I edit plugin file avatars.php on line 683
 *     ```
       // The web-server root directory.  Used to create absolute paths.
            $root = avatar_root();
       ```
   
 * to
    `$root = '/home/myhostfolder/public_html/';`
 *  My /avatars folder is in my wordpress folder root. And now it works pretty well!
 *  [John Robertson](https://wordpress.org/support/users/braddor/)
 * (@braddor)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327859)
 * Indeed, same issue I had. My WP installation is in a subfolder of the public_html.
   I figured a way to cheat the system by putting the avatars folder in the root,
   however I am not going along with it because it might mess up things for future
   updates.
 * Simply said, the paths are wrong when being displayed on the front end.
 *  [jegroen](https://wordpress.org/support/users/jegroen/)
 * (@jegroen)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327884)
 * Same here. I have used your solution, Decadence, and now it works.
 * For the rest, thanks for this nice plugin!
 *  [carlos_wp](https://wordpress.org/support/users/carlos_wp/)
 * (@carlos_wp)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327889)
 * I was having exactly the same problem. I did not find documentation for the legacy
   option, and took for granted it was some kind of “retro-compatibility” option
   for previous versions. Until I checked it, and found it does exactly what I wanted:
   it allows me to update to [www-whatever-html}/avatar_path, but displays the image
   just as /avatar_path. At last it works!
    Thanks for the plugin, Peter.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘[Plugin: Add Local Avatar] problems with directory path’ is closed to
new replies.

 * 12 replies
 * 8 participants
 * Last reply from: [carlos_wp](https://wordpress.org/support/users/carlos_wp/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-add-local-avatar-problems-with-directory-path/#post-1327889)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
