Closed (works as designed)
Project:
ImageCache Profiles
Version:
5.x-1.3
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 May 2008 at 12:06 UTC
Updated:
13 Sep 2008 at 13:04 UTC
I got the impression that the picture that would be loaded with the user object was supposed to be the user_image_default image cache preset,
on the user page the user_image_large would be shown. However I followed the instruction and redid them twice but I still get the original image when going for the $user->picture value.
So there must be some loop in my thinking, basically what I want to know is when and how can I get hold of user_image_default and, when and how can I get hold of the user_image_large?
Thanks
Martin
Comments
Comment #1
v1nce commentedOn the user settings page - admin/user/settings, have you selected your imagecache presets?
Comment #2
reed.richards commentedThe problem was that I am using a redirect when the user is viewing his/her page, I wanted to able to layout it. When using the default layout the picture is shown as it should. Now, after doing some research I found that what I wanted the module to do was to replace the default picture in the $user object which it doesn't unless you do a hook load or something haven't checked the code that thoroughly(I might be way of on this).
I also did some research on the $user object and basically every time I would want to access the picture I would have to call the user_load which then invokes the hook_user which then fires a query for that user. If I would want to show the picture on every page I would add a lot of queries to the database which isn't that funny. So it doesn't seem that there's a good way to add data to a $user object that doesn't have to include user_load which kind of sucks(I might be way of on this too...).
So what I did was to set up a node profile, add a user image field, add presets to it and then have a custom module set a session variable on login using hook_user to the value of the image field and then destroy the session variable on logout.
Comment #3
v1nce commentedIt sounds like this was out of the scope of imagecache_profiles.
Comment #4
Sven_S commentedhmmm ... I have a similar problem. Profile pictures aren´t resized.
On ... admin/user/settings there are no entries in the "Set user profile picture size with this ImageCache preset: " - dropdown.
Did I miss anything else?
YES I MISSED SOMETHING: I didn´t set anything in admin/build/imagecache
So I did that and get an entry in the dropdown!!!!