Hello,
Maybe I'm just doing something wrong, but it seems like the drupal 7 image styles do not get applied to default profile pictures. I'm using the imageCache profile module to apply two different image styles - one for thumbnails and another for the profile page. The styles work great for images that users upload, but they don't work at all for the default image.

Has anyone else had a problem with this? If so, have any of you found a clean workaround?
thanks!

Comments

Anonymous’s picture

I had that problem too. To resolve it, and get the styles applied, you have to use a drupal file pattern with your default profile picture. So something like public://pictures/default-pic.jpg. public:// is a placeholder for your site's public files location - most likely sites/default/files/.

gionnibgud’s picture

Saved my day ;)

Design By Committee Brings Death.

gbowman’s picture

Wooo cheers for the post, this was quite hard to find due to my vague search terms. Seems daft that it cant convert images referenced in /sites/default/files/user-pictures/profile.jpg

Jessica A’s picture

omg!! thank you! I was looking everywhere for this; not sure why it's not stated more clearly that "public://" needs to be used in place of the actual path.

eodonnell’s picture

There's a lot of open issues on this problem - in the views module mostly. Glad I found your post!

RaulMuroc’s picture

Where do I have to introduce this path?

I say because I am just uploading the "default image" and Drupal automatically creates the styles directory and so on. I am not setting up anything manually.

Thanks and sorry for misunderstanding.

Drupal Association individual member

rico3030’s picture

After a long search: Many many Thanks!! This should be given as an advice in the user settings form...

sylvaticus’s picture

I add myself to the list of people thanking you ;-)

ClimbingUpTheWalls’s picture

Thank you so much ! Saved me from hours of debugging.

jaybriss’s picture

THX!!!!

Very usefull!!! :-D

leanne9’s picture

Always an adventure!

smartsystems160’s picture

omg @rsmylski, your post saved me a lot of time, it was a bit confusing till i did some trial and error, so let me clarify for others in my position. I had to manually upload my default image to sites/default/files/pictures directory, then i referenced public://pictures/(mydefaultimage) as the default image under my account settings. This wasn't the case for drupal 6 as one could just reference any directory, infact my default image in drupal 6 was images/(mydefaultimage).

Thanks once again @rsmylski

redbrickone’s picture

I'm having the same issue in Drupal 8. 
Do I need to set the file path for all public uploads in the settings.php?

My files are currently set to go into `sites/default/files` - so would i change to be `public://sites/default/files`?

Thanks!