Support » Plugins » [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)
  • Yes, it’s obvious really, you’ve almost answered your own question – set the Avatar upload path option to /public_html/avatar

    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

    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

    but the display directory needs to be http://mydomain/avatars

    Please need a fix!

    thank you

    If this used to work for you, try checking the legacy v7.3 option…

    Where can we find previous releaser and then.. de 7.3


    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.

    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.

    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.

    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();

    $root = '/home/myhostfolder/public_html/';

    My /avatars folder is in my wordpress folder root. And now it works pretty well!

    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.

    Same here. I have used your solution, Decadence, and now it works.

    For the rest, thanks for this nice plugin!

    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.