Imagecache Profile 6.x-1.1
Imagecache 6.x-2.0-beta10
Image API 6.x-1.6
ImageAPI GD2 6.x-1.6

Currently, the problem is with the default user pictures appearing broken.
I checked the issue queue at Imagecache profile and followed what fixed the issue for most. This was putting a copy of the default picture in:

Problem is, when I try to put images there I am told I don't have the permissions.
I tried changing the permissions on those folders and it told me I don't have the permissions to change the permissions.

I will be writing to my hosting guy about changing the permissions for me, but I wanted to inform imagecache and imagecache profiles about this so you know. Maybe something is setting permissions so I can't upload images in there.

#11 prog.PNG9 KBrajesh1158
#8 Picture 3.png7.56 KBsharp3d
Members fund testing for the Drupal project. Drupal Association Learn more


Kristina’s picture

To get around this permissions issue as I could not upload the files via my FTP client, I had to install IMCE and upload using that.

I do think that having to install a module for me to upload the default images for imagecache profile was a bit excessive but that's what I had to do.

dman’s picture

Project: ImageCache » ImageCache Profiles
Version: 6.x-2.0-beta10 » 6.x-1.1

That work-around, placing your own images in the imagecache-managed directories, is a bit screwy and not how anything is expected to work, so any complaints about that process are all due to your own choices.

Imagecache itself does not define any 'default' image anywhere, so if there is an issue, it's up to imagecache_profile to sort out.

BTW, if you have permissions problems in the future, the troubleshooting FAQ has an answer for you.

andypost’s picture

Looks strange... maybe related to private file downloads for user pictures. Suppose caused by using default image for user pictures which stored in public folder.

If I remember there was a some fix for private file download of user pictures.

Anyway need more info...

Todd Nienkerk’s picture


I'm experiencing the same problem: ImageCache isn't handling the default user picture. The workaround I'm looking into involves overriding template_preprocess_user_picture() to hard-code default images that mimic various presets. It's fairly unpleasant considering that the user picture is intended to be used in multiple instances: profile, comments, etc.

Todd Nienkerk’s picture

Since ImageCache probably won't support default user pictures (or any default images, for that matter) for some time, I see two ways forward:

  1. Add ImageCache Profile-specific variables for custom user pictures. This can be done easily by moving the existing default picture field below the "Default picture preset" drop-down and adding two new fields below "Profile picture preset" and "Comment picture preset." This way, each picture type (default, profile, and comment) can have its own default picture.
  2. Streamline imagecache_preprocess_user_picture(), supply a final else case to address instances in which a default image is not set, and provide documentation on how a user can copy this hook and modify the else case to suit their needs. Here's an example:
 * Override or insert vars into user-picture.tpl.php.
 * Originally built by template_preprocess_user_picture() in user.module and
 * imagecache_profiles_preprocess_user_picture() in imagecache_profiles.module.
 * @see user-picture.tpl.php
function MYTHEME_preprocess_user_picture(&$variables) {
  // Reset picture.
  $vars['picture'] = '';

  // Continue only if user pictures are enabled and the imagecache_profiles module exists.
  if (variable_get('user_pictures', 0) && module_exists('imagecache_profiles')) {
    $account = $vars['account'];

    // Determine picture type.
    $picture_type = 'default';
    if (arg(0) == 'user' && is_numeric(arg(1)) && (arg(2) == NULL || arg(2) == 'edit')) {
      $picture_type = 'profile';
    if (array_key_exists('cid', get_object_vars($account))) {
      $picture_type = 'comment';
    if (isset($account->imagecache_preset)) {
      $picture_type = 'view';

    // If the user has a picture:
    if ($account->picture && file_exists($account->picture)) {
      $picture = $account->picture;

      // Determine if we have a default ImageCache preset.
      if (variable_get('user_picture_imagecache_profiles_default', 0)) {
        // Define default user picture size.
        $size = variable_get('user_picture_imagecache_profiles_default', 0);
      // If on a user profile page:
      if ($picture_type == 'profile') {
        if (variable_get('user_picture_imagecache_profiles', 0)) {
          $size = variable_get('user_picture_imagecache_profiles', 0);
      // If viewing a comment:
      if ($picture_type == 'comment') {
        if (variable_get('user_picture_imagecache_comments', 0)) {
          $size = variable_get('user_picture_imagecache_comments', 0);
      // If Views set an ImageCache preset:
      if ($picture_type == 'view') {
        $size = $account->imagecache_preset;

      // Get preset.
      $preset = imagecache_preset($size);
    // If user has no picture and a default picture is set:
    else if (variable_get('user_picture_default', '')) {
      $picture = variable_get('user_picture_default', '');
    // Provide custom defaults. Requires user_picture_default to remain unset.
    // If user has no picture and no default picture is set:
    else {
      switch ($picture_type) {
        case 'comment' :
          $picture = 'sites/all/themes/MYTHEME/images/user-picture-default-comment.png';

        case 'profile' :
        default :
          $picture = 'sites/all/themes/MYTHEME/images/user-picture-default.png';

    // Generate alt and title text.
    $alt = t("@user's picture", array('@user' => $account->name ? $account->name : variable_get('anonymous', t('Anonymous'))));

    // Generate picture.
    if (isset($preset)) {
      $variables['picture'] = theme('imagecache', $preset['presetname'], $picture, $alt, $alt);
    else {
      $variables['picture'] = theme('image', $picture, $alt, $alt, '', FALSE);

    // Link picture to account.
      if (!empty($account->uid) && user_access('access user profiles')) {
        $attributes = array('attributes' => array('title' => t('View user profile.')), 'html' => TRUE);
        $variables['picture'] = l($variables['picture'], "user/$account->uid", $attributes);
andypost’s picture

Status: Active » Postponed (maintainer needs more info)

Default image picture settings at admin/user/settings so placing something like /avatars/default.jpg is working fine

Hardrocker’s picture

My problem isn't the default image its imagecache profile presets. Everytime I enable it it breaks the images. New images are not even displaying either. Any ideas why Imagecache profile is not playing nice with user.module?

sharp3d’s picture

Title: Working with imagecache profile - default image does not show » Working with imagecache profile - image does not show
7.56 KB

I am seeing the same broken images here. This is our dedicated Windows server. My personal site on Godaddy (linux) works fine. Time for lunch but I will post back if I get it working.

buzzman’s picture

hi sharp3d: is lunch over yet ... ;-)

sanderc’s picture

Is this a permissions problem, or a problem that ImageCache didn't work?

I found out today (after extensive search) that ImageCache does not work without Clean URL's enabled. Look at the ImageCache project page or the issue-page #410200: Without clean URLs ImageCache doesn't create folders or images.

Hope this helps...


rajesh1158’s picture

Title: Working with imagecache profile - image does not show » Working with imagecache profile - image is broken
Category: bug » support
Priority: Normal » Major
9 KB

I'm very depressed about displaying the profile pic on the user's profile page (like in facebook). The image is broken and so is the default image. I've checked the image paths and they are correct. When i inspected the image(in google chrome browser), it showed a warning saying "Resource interpreted as image but transferred with MIME type text/html". What am i supposed to do??

fizk’s picture

Version: 6.x-1.1 » 6.x-1.3
Category: support » bug
Status: Postponed (maintainer needs more info) » Active

Broken for me too.

fizk’s picture

When the default user picture begins with "/", this problem goes away........but the URL has an extra forward-slash:

John Sundarraj’s picture

Hey all, i have been using open atrium for long time. User profile image seemed to broken when i uploaded new picture.So i debugged and fixed using PHP Xdebugger. kindly visit my blog post at