Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is it just me or is anyone else experiencing this issue?
When I set the "Profile picture preset:" the default picture in user settings doesn't show on new accounts.
BTW I am using advance profile kit and user pane modules. Not sure if that is the cause but will test it with those disabled and report back.
In the interim is there anyone else experiencing this behavior?
Comments
Comment #1
itaine CreditAttribution: itaine commentedreporting back: disabled APK and Author pane modules and same behavior. When imagecache profiles are set, I get text "Guest's Picture" where there is suppose to be the default picture.
Comment #2
harmony CreditAttribution: harmony commentedI have the same issue. I am using v6.6. I have searched but have been unable to find any info on this issue other than this post. I do notice that the pictures field in the users db table is not being filled in like the users who upload their own pictures. Is this normal?
Thanks!
Comment #3
totocol CreditAttribution: totocol commentedSame issue here. Now the user's pictures are not showing across the site. Just the "user's picture" text.
Might have to disable the modules if we cannot find an answer.
Thanks
Comment #4
totocol CreditAttribution: totocol commentedHello
Just make sure the GD2 module is also installed. It fixes the issue. Its working just fine after that.
Comment #5
itaine CreditAttribution: itaine commentedyou talking about the ImageAPI GD2? if so I had that enabled and still had the issue regarding the default image.
Comment #6
totocol CreditAttribution: totocol commentedCan you explain little bit better? I do not seem to have any issues anymore. Did you follow all the instructions regarding picture sizes and pixels?, Did you check that you do not have anything else in your theme that might be overriding the pictures styling?. Check that with firebug. Did you update the PHP and cleared the Cache after you installed the module?. Is it only having with new accounts?
Comment #7
spas CreditAttribution: spas commentedHi,
I'm having the same issue and I will try to explain it better:
I have set default user image with full path and this is what I get when try to use it with imagecache profile on comment and also on User profile page:
/files/imagecache/thumb_64/http://daleche.bg/phoenix2/sites/all/themes/zen/phoenix/gfx/forum-icons/..."/>
Everything works fine when I upload a picture to the user profile, but that's not the case with default pictures.
Obviously default picture is not processed.
Thank you in advance.
Comment #8
oldphotos CreditAttribution: oldphotos commentedHave the same issue.
User photos show just fine. The default photo doesn't show. In internet explorer it's a white box with an x - even though the path is correct to the photo (and photo is right size, etc).
Using ImageAPI GD2.
Has anyone found a solution?
Comment #9
halver CreditAttribution: halver commentedThe problem is that it is looking for the default photo in the wrong place. If you tell it to look for the default photo in mysite.com/sites/all/default, for example it will in fact append that path to wherever imagecache is storing files, for example in system/files/imagecache/user_image_default with the result that it is looking for a photo in system/files/imagecache/user_image_default/mysite.com/sites/all/default. oops.
You can see this for yourself with firebug.
This is obviously a bug that should be fixed pretty easily. But in the meantime you can solve it by simply putting your default pic where the module expects to find it. In my case, for example, I put one default_avatar.gif in system/files/imagecache/user_image_default and one in system/files/imagecache/user_image_large. Then, in user settings, set the default photo to be simply default_avatar.gif (or whatever your image is called), with no path in front of it.
Good luck.
Comment #10
patchak CreditAttribution: patchak commentedThis helped, default images are showing now, thanks a lot!!
Comment #11
lipinponmala007 CreditAttribution: lipinponmala007 commentedin my case i checked that image location and it is found to be varying when i vary the default settings for user .so i made an image for the location where the browser says ..thus i managed this problem
and the above method seems to be working for me...
Comment #12
andypostLooks like the problem is more related to imagecache not this module.
Any opinions?
Comment #13
Kristina-2 CreditAttribution: Kristina-2 commentedHi.
My default user pictures comes up as a broken image.
I tried placing the expected images in the right places but it seems the permissions on those folders won't let me. I've tried changing the permissions to those folders and it won't let me change them either.
Comment #14
Kristina-2 CreditAttribution: Kristina-2 commentedTo fix this and get around the permissions problem. I had to install imce and upload the images through that.
Comment #15
virtualdrupal CreditAttribution: virtualdrupal commentedJust chiming in to say this is still an issue.. had to manually create the imagecache folder for each profile, resize the default image manually and copy it to the appropriate folders.
Comment #16
Guty CreditAttribution: Guty commentedSame issue here. Everything works fine for user uploaded pictures, but default picture doesn't show up.
I'm using Drupal 6.15 with
imageapi 6.x-1.6
imagecache 6.x-2.0-beta10
imagecache_profiles 6.x-1.1
For me there are two issues:
1st: Help text of 'Default picture' in 'User settings' is misleading. It says 'URL of picture to display for users with no custom picture selected'.
A look in firebug shows that this has to be just the path and the name of the picture beyond the 'Picture image path' field above.
OK. This is another story.
2nd: When I've updated the path and name as describe in my first issue, the default picture still doesn't show up. Another look in firebug shows the reason. The URL shown in firebug is http://example.com/sites/default/files/imagecache/avatar_profile/default... while the real URL would be http://example.com/sites/default/files/imagecache/avatar/avatar_profile/...
I seen that on the profile page.
I use these settings in 'User settings':
Picture image path: avatar
Default picture: default-picture.jpg
So it looks like imagecache_profile doesn't care about the 'Picture image path'. Visiting the URL that it should be shows the image with right dimensions.
BTW: GD is turned off. I just use imagemagick.
Quick workaround: Place a link from the in the location where the picture should be to the location where it actually gets generated from the module (after you typed in the URL in your browser for the first time).
Hope this is some help.
Guty
Comment #17
andypost#16 Can you see default avatar with imagecache_profile module disabled?
What versions of modules are you using?
Comment #18
Flying Drupalist CreditAttribution: Flying Drupalist commentedI was using the latest stable, after seeing #17 I updated to the latest, got this:
Fatal error: Cannot access empty property in /www/sites/all/modules/imagecache_profiles/views/imagecache_profiles_handler_field_user_picture.inc on line 32
And now is back at the stable...
Edit: Here's the url that profile was looking in:
src="http://site.com/sites/site.com/files/imagecache/avatar_preset/"
That's right, there's no image at the end of the src, even though I had set one at default_avatar.jpg.
Comment #19
andypostCaused by previous commit, fixed http://drupal.org/cvs?commit=313062
Comment #20
ezra-g CreditAttribution: ezra-g commentedThis can be caused if you've entered a full URL in Drupal core's default profile field, such as http://example.com/image.jpg. If you reconfigure this value with a relative path, such as sites/all/files/image.jpg, the profile pictures should display as expected. The underlying reason is that theme_imagecache expects a path relative to the Drupal root directory, not a full URL.
@halver It appears the important the difference between the two paths you mentioned in #9 is that one specifies the site domain while the other uses a relative path -- you can place your image wherever you want.
If this doesn't resolve the problem for folks in this issue, please re-open.
Comment #22
navid.kashani CreditAttribution: navid.kashani commentedI Have the same issue #18
Comment #23
andypostthis was already fixed? so what version you are using?
Comment #24
alexkessler CreditAttribution: alexkessler commentedI stumbled upon the same problem.
Using the latest release (not dev) of imagecache and imagecache_profile always adds the path:
http://www.example.com/files/imagecache/[imagecache_profile_preset]/
So, if I now using a relative path inside Drupal core's default profile field such as:
sites/all/files/image.jpg
I get a path like this:
http://www.example.com/files/imagecache/[imagecache_profile_preset]/site...
The only workaround is to put the default picture inside the [imagecache_profile_preset] folder and just
use image.jpg inside Drupal core's default profile field.
Comment #25
jwilson3There is another case when an empty image is not shown, and i wanted to link it in here, for people that may arrive at this page from a search.
Scenario:
You want to show a user profile image at any other imagecache preset than one of the three specifically allowed on admin/user/settings.
I found a way you might do this on comment #2: http://drupal.org/node/374372
Namely, use:
instead of:
However, there is an issue with this method when a user hasn't uploaded a profile image. Calling theme imagecache will proceed to create an 'empty' image for the preset you specify, that will look something like what the OP is experiencing.
This is because $account->picture might be empty. Basically, you have to call theme('user_picture') to ensure imagecache_profiles does its magic to create the path to the default image correctly.
It might be obvious to others, but I had to dig through imagecache_profiles_user_picture() to find a solution on how to do this correctly by hand. Its described in option 2 of comment #5 of #374372: Imagecache user picture.
Comment #26
ressa CreditAttribution: ressa commentedThe solution for me was post #20 by ezra-g, thanks!
I had entered the complete path to a "default_pic" folder I had created, with this path it works:
sites/default/files/default_pic/default_profile.png
Comment #27
Fidelix CreditAttribution: Fidelix commented<img src="http://mysite.net/sites/default/files/imagecache/perfil_46/sites/all/imagens/sem-avatar.png" class="imagecache imagecache-perfil_46">
The picture is actually at mysite.net/sites/all/imagens/sem-avatar.png
My setting in the user config page is this:
"sites/all/imagens/sem-avatar.png"
It seems that imagecache is appending the picture, no matter whats the setting.
Comment #28
Fidelix CreditAttribution: Fidelix commentedIgnore me, please.
My image path was wrong, default image works perfectly when using relative paths.
Comment #29
MAds CreditAttribution: MAds commentedIm not sure what kind of mess Ive made, but I still cant get the default avatar to show.
Using this code in the user-picture.tpl.php
the uploaded picture works perfectly, as well as the default picture for users who have been deleted and no longer have profiles
It does not show the default photo for users who have profiles. In fact, although the default path has been set in the token avatar, the user picture settings and the above code, it instead creates a new path /sites/default/files/imagecache/frontpage/user_pictures/16/defaultavatar.jpg. As I have read from other posts, I can just put the default photo where it is searching, but in this case it is created for each new user (in this example 16), so it would be impossible to constantly go in and add the file. Additionally, when checking the database, the folder it is searching in is not even created until a photo is uploaded.
Any insight on how to sort this out is welcome. I have the imagecache profiles enabled.
Thanks in advance
Comment #30
jwilson3@MAds If you have the ability to install imagecache_profile module, then there's no need to overwrite user-picture.tpl.php, you can specify the preset you want in the admin interface.
Comment #31
Albert Volkman CreditAttribution: Albert Volkman commentedThanks, #9 fixed it for me!
Comment #32
Michsk CreditAttribution: Michsk commented@25, superb!
Comment #33
andypostJust add a parameter for
$account->imagecache_preset
Source D6
Related for D7 #1300064-5: Integrate imagecache external with imagecache profiles
Comment #34
andypostI'm waiting for change notification from #517814-136: File API Stream Wrapper Conversion
Closed as duplicate about 7.x #1305800: Default image not being resized
Comment #35
pillarsdotnet CreditAttribution: pillarsdotnet commentedChange notice added; please review.
Comment #36
andypost@pillarsdotnet Thanx a lot