Simple musings of a Drupal developer.

Imagecache and You (err, your picture)

By krs · January 6, 2009 · 0 Comments · 169 Views

When you using imagecache on the $user->picture, many people have noticed 1 small problem. If someone uploads a new picture, everything appears to work fine, but the user photo stays the same!

What's going on? When a user uploads a picture, it gets renamed to a specific filename - doesn't matter the name of the file you uploaded. Imagecache then makes a copy of that file to display. (Technically this doesn't happen until the first time the image is viewed with a particular preset). When the new user image is uploaded, it gets the very same name as the previous one, again regardless of the actual filename that was uploaded. Now imagecache will think it already has a cached version of that image, because it just checks the filename and sees that it exists!

So I was all about to post on how to fix that, basically by linking to Nate Haug's excellent post on how to do just that - but the Imagecache module maintainers have just made a new release (for Drupal 5) that includes a fix for the issue! So the new solution is - download the latest version of the Imagecache module!

Filed in:
Tagged with: , , ,

Post New Comment

If you are already an OnSugar member, or would like to receive email alerts as new comments are made, please login or register for OnSugar. Or connect with your Facebook account: .
The content of this field is kept private and will not be shown publicly.

About Me

Drupal.org username: kscheirer

subscribe

Drupal Cred

Drupal Camp Los Angeles 2009 - August 8-9th

Archive

November 2009
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
2930 
August 2009
SMTWTFS
 1
2345678
9101112131415
16171819202122
23242526272829
3031 
July 2009
SMTWTFS
 1234
567891011
12131415161718
19202122232425
262728293031