Profile images won't display

Profile images won't display

by Robert Lefebvre -
Number of replies: 15
I just did a fresh install of the latest stable version . I can't get the profile pictures to display properly. I've tried various jpgs but they all show just a black square. Right clicking to get the image properties gives me a url of the profile pic, which again is all black in the browser.

Does anyone have an insight ito this problem?  Could it be related to the fact I'm running this Moodle on a sub-domain??

Thanks
Average of ratings: -
In reply to Robert Lefebvre

Re: Profile images won't display

by Jan Dierckx -
Login as Admin, go into the "Configure Variables" page and change the setting for "slasharguments".
More about this in the Moodle FAQ under Uploaded files give "File not found"
In reply to Jan Dierckx

Re: Profile images won't display

by Phil Brown -
I have a similar problem as well with 1.3.3. In the ´edit user profiles´ section there is no place to upload a user picture. It is simply not there. This is not the case with other installations of Moodle. Can anyone tell me how I can get it in there?

I also had a problem where none of my pictures would display. This was fixed when I followed the suggestion above but I´m mystified where the facility to upload button pictures has gone.
In reply to Phil Brown

Re: Profile images won't display

by Christos Vasilikiotis -
This is really strange! In my first install of 1.3.3, the "upload image" for a profile worked fine. When I did another install of the same version of moodle on another server, the "upload image" ability is missing from the profile!

Is there a setting that I missed the second time?

Thanks,
Christos
In reply to Phil Brown

Re: Profile images won't display

by André Krüger -
Picture of Core developers
Hi Phil,

I have in version 1.3.3. to settings for user picture:
  • Current picture, with a button to delete it
  • New picture with browse button
Hope this helps.

In reply to Phil Brown

Re: Profile images won't display

by Christos Vasilikiotis -
Actually, if you look at the help files you will find the reason we are having these problems wink It turns out that one hosting company had it set up properly whereas the other on did not. I will have to contact them to see if they know how to change it to enable GD.

From the help file:
"If you don't see anything on your user profile pages to let you upload user images then it's usually because GD is not enabled on your server. GD is a library that allows image processing.

Make sure GD has been included in your PHP installation. You can check this by going into the Admin -> Configuration -> Variables page and looking for the gdversion setting.

This setting is chosen automatically every time you visit that page. If it shows GD version 1 or version 2 then everything should be fine. Save that configuration page and go back to your user profile.

If Moodle thinks GD is not installed, then you will need to install it. On Windows this is usually a matter of "turning on" the module in PHP (see the installation instructions for help). On Unix you may need to re-compile PHP with arguments something like this (note the ones in bold):

./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-ttf --enable-gd-native-ttf --enable-magic-quotes --with-mysql --enable-sockets --enable-track-vars --enable-versioning --with-zlib

Remember to re-visit the Moodle configuration page after making any changes to PHP so it can pick up the correct version of GD."

Christos
In reply to Christos Vasilikiotis

Re: Profile images won't display

by Worth Bishop -

Very helpful - thanks.

By the way, could you let us know which hosting company has it right?

Thanks again.

In reply to Worth Bishop

Re: Profile images won't display

by Christos Vasilikiotis -
The company who had the GD library set up properly from the start was JaguarPC.com. The other company had to move our site to another server which was set up for GD.

Another thing that did not work at start was the ability for moodle to send e-mail to those registering. After our move to the new server the mailing function (SMTP server) is working fine.

So if you are having problems you can check if you hosting company have a server configured for what you need and ask to be moved there.

Christos
In reply to Robert Lefebvre

Black squares instead of profile images

by Zbigniew Fiedorowicz -

Hi Robert,

I just had the same problem.  In my case, our system administrator upgraded the operating system on the server from Red Hat 9.0 to Red Hat Enterprise. Afterwards, old profile images displayed properly, but any newly uploaded ones displayed as black squares.

After a lot of frustration, I figured out what was the problem.  The old operating system had version 1.x of the GD library installed, whereas the new OS has GD version 2.0.  The solution was simple: went to the Administration Variables page, noted that Moodle detected GD version 2.0 and clicked on the "Save Changes" button.

Zig

In reply to Robert Lefebvre

Re: Profile images won't display

by Ted Capps -
I had the exact same problem in version 1.5. I went to CONFIGURATION -- VARIABLES -- under OPERATING SYSTEM -- in SLASHARGUMENTS change to file.php?file=/pic.jpg

Once I did this, profile pics loaded great.
In reply to Ted Capps

Re: Profile images won't display

by Susan Mangan -
Hi all,

We just upgraded from 1.8.2 to 1.8.4 and are having the same problem.

You say to login as Admin and go to Config, Variables... etc. however, I must be having a daft moment as I can't figure out where this is within Moodle settings. Or is this a server setting?

Thanks!

Susan

Update... OK I found the setting, but didn't seem to help. In fact, when I try to save changes on this admin page (http) I get the following error:

Some settings were not changed due to an error:
This value was not valid:Proxy port

Any ideas? And could this be the reason the user profile pics are not displaying? I was able to successfully upload a new profile pic.
In reply to Susan Mangan

Re: Profile images won't display

by Mary Veinotte -

My issue is that I uploaded a picture when I first edited my profile and it worked.  But now, I have tried to upload a different picture and it keeps going back to my first picture.  I've even deleted the first picture from my computer entirely!!!!!  Why does it keep coming back?????   What do I do so that my new picture will show?

In reply to Mary Veinotte

Re: Profile images won't display

by Richard Enison -
MV,

Exactly how did you upload the new picture? I suspect that the picture you deleted is not the copy that Moodle uses, and I would not be too surprised if you are likewise uploading the new picture to the wrong directory, rather than using Moodle itself to replace the picture. Oh, one more thing. In my experience, when you change the profile picture in Moodle, it doesn't take effect right away. I don't recall exactly when it did for me, but I think if you restart your database server, your web server, and Moodle, it will show the new profile picture (assuming it was uploaded properly!).

EDIT: I just went to the picture upload page in my Moodle, and clicked the help button. It said it should suffice to do a reload (refresh) in your browser to get the new picture to appear in your profile.

RLE
In reply to Richard Enison

Re: Profile images won't display

by brown mr -
i also having same problem regarding update the picture with new one....the picture display the previous one..once i refresh that web browser, it will display the new image. So is there any solution to ensure that the new picture will display without to refresh that page??
In reply to brown mr

Re: Profile images won't display

by Richard Enison -
BMR,

All I can think of is: there is a meta HTML tag, or HTTP header, that can be included in or with a web page that will prevent browsers from caching that page, so you always get the latest version of it and shouldn't have to refresh it. But as far as I know, there is nothing like that for individual images. I could be mistaken.

Anyway, you should only have to do a refresh once after replacing your profile image; and most people don't do that very often, so it wouldn't be a major problem.

RLE