You are here

README.txt in ImageCache Profiles 7

Same filename and directory in other branches
  1. 5 README.txt
  2. 6 README.txt
Imagecache_Profiles module allows you to set user profile pictures that are consistent throughout your site and allows avatars on the user profile, node pages and comments to be a different size. 

- Enable core's Image module
  -visit admin/config/media/image-styles page
  - create a new Image Styles with the following settings
    - preset namespace: user_image_default
      - select "Scale and Crop" from the Effect table
        - set width and height to 100
    - preset namespace: user_image_large
      - select "Scale and Crop" from the Effect table
        - set width and height to 200

- Download and enable the ImageCache_Profiles module as usual
  - Enable user pictures at admin/config/people/accounts
    - if setting a default picture it should use a relative url path (ex. public://default_picture.png)
    - set picture maximum dimensions to 1600x1400
    - set picture maximum file size to 1024
    - set your picture guidelines text to: "Photo must be larger than 200x200 pixels." To prevent upscaling, these dimensions should be the dimensions of your largest preset.
    - select the Image style to set the user picture size on a user's profile page
    - select the Image style to set the user picture size within comments
    - select the Image style to set the user picture size within nodes
    - select the Image style to set the default user picture size throughout the site
    - set picture minimum width in pixels: 200
    - set picture minimum height in pixels: 200
      - To prevent upscaling, these dimensions should be the dimensions of your largest preset.
    - save configuration

- Developer docs
  - Module implements hook_preprocess_user_picture()
  - Examples of usage

  $account->picture = $file_id; // Or assign a image-file object itself.
  // $account->picture->uri is ONLY used for theme_image_style().
  // Optionally assign a style to file.
  // $account->picture->style_name = 'medium';
  // Or account itself.
  // $account->user_picture_style = 'large';
  $output = theme('user_picture', array('account' => $account, 'user_picture_style' => 'thumbnail'));

File

README.txt
View source
  1. Imagecache_Profiles module allows you to set user profile pictures that are consistent throughout your site and allows avatars on the user profile, node pages and comments to be a different size.
  2. - Enable core's Image module
  3. -visit admin/config/media/image-styles page
  4. - create a new Image Styles with the following settings
  5. - preset namespace: user_image_default
  6. - select "Scale and Crop" from the Effect table
  7. - set width and height to 100
  8. - preset namespace: user_image_large
  9. - select "Scale and Crop" from the Effect table
  10. - set width and height to 200
  11. - Download and enable the ImageCache_Profiles module as usual
  12. - Enable user pictures at admin/config/people/accounts
  13. - if setting a default picture it should use a relative url path (ex. public://default_picture.png)
  14. - set picture maximum dimensions to 1600x1400
  15. - set picture maximum file size to 1024
  16. - set your picture guidelines text to: "Photo must be larger than 200x200 pixels." To prevent upscaling, these dimensions should be the dimensions of your largest preset.
  17. - select the Image style to set the user picture size on a user's profile page
  18. - select the Image style to set the user picture size within comments
  19. - select the Image style to set the user picture size within nodes
  20. - select the Image style to set the default user picture size throughout the site
  21. - set picture minimum width in pixels: 200
  22. - set picture minimum height in pixels: 200
  23. - To prevent upscaling, these dimensions should be the dimensions of your largest preset.
  24. - save configuration
  25. - Developer docs
  26. - Module implements hook_preprocess_user_picture()
  27. - Examples of usage
  28. $account->picture = $file_id; // Or assign a image-file object itself.
  29. // $account->picture->uri is ONLY used for theme_image_style().
  30. // Optionally assign a style to file.
  31. // $account->picture->style_name = 'medium';
  32. // Or account itself.
  33. // $account->user_picture_style = 'large';
  34. $output = theme('user_picture', array('account' => $account, 'user_picture_style' => 'thumbnail'));