Modify profile image - how to change an image once uploaded?

Modify profile image - how to change an image once uploaded?

by George Kao -
Number of replies: 3

Hi all,

Here's an interesting problem:

I can upload the first profile image to an account, no problem.

I can also delete that profile image so that the default smiley face replaces it.

However, when I try to upload a second image (to replace the smiley face, or to replace the first image), the first image shows back up smile

Any thoughts on how to solve the problem?

Thanks!

George

p.s. This may be related to another issue (changing the logo) which I posted here:  http://moodle.org/mod/forum/discuss.php?d=10483

Average of ratings: -
In reply to George Kao

Re: Modify profile image - how to change an image once uploaded?

by Kingsley Kerce -
George -- Browse to the personal profile page in question, then tell your browser to visit the URL of the profile image only. This is typically accomplished by clicking your mouse's right button while the mouse pointer is on the image, then selecting "View Image". At this point, your browser will be visiting the image only, e.g., the browser location will show something like:

Finally, tell your browser to reload the image. There should be a reload icon on your browser toolbar, or under the View menu, or use Ctrl+R or F5, etc.  This should refresh the image in your browser's cache.

Kings

In reply to Kingsley Kerce

Re: Modify profile image - how to change an image once uploaded?

by George Kao -

Kings,

Thank you!  It worked.  In Windows XP, we right-click on the image, click Properties, then highlight the URL of the image, copy it, paste it in the browser address bar, which brings up the old image.  Click refresh (press F5) twice, and that brings up the new image.  We then go back to our profile page and we'll see that the image is updated.

Then, we also need to do the same steps with the smaller version of the profile image (e.g. http://moodle.org/user/pix.php/17390/f2.jpg ).

1. This is a good work-around.  I wonder, though, whether there is a programming solution? 

2. Also, will other peoples' browsers display the new image, or will they need to go through the same steps to see my new profile image?

Thank you,

George

In reply to George Kao

Re: Modify profile image - how to change an image once uploaded?

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You don't have to do this much. 

Your browser is caching old images for a few hours (as Moodle told it to do for efficiency).  The problem is just that your browser won't check the server for a new image for a few hours and so doesn't detect that the image changed.  There is no way to alert the client that the image has changed (apart from turning off the caching, which would create a bigger load on the server).

Other people who log in to the server after you8 changed the image are, in all probability, seeing your new image.

So to fix things on your own browser you can just go to your profile page, hold down the "shift" key and press reload.  This forces the browser to fetch everything on it again (including the large and small profile images).

Alternatively, you can just not worry about it.  In a few hours your browser will sort itself out automatically.