This code effectively does a client-side reize of images already sized by imagecache. We should refactor this.

For more, see http://drupal.org/node/1411684#comment-5546614

.activity-log-picture {
  float: left;
  margin-right: 10px;
  width: 30px;
}

.activity-log-picture img {
  width: 100%;
  height: auto;
}

Comments

ay13’s picture

Status: Active » Needs review
StatusFileSize
new317 bytes

Removes the set width on the image container so images can be any size.

icecreamyou’s picture

When I do that on a local Commons install, the images end up way bigger than they should be. It looks like the problem is the [author:picture] token, and there don't appear to be imagecache-related tokens to replace it. Anyway I hesitate to use imagecache-related tokens by default since that would add a dependency on imagecache.

Not sure what the right solution is here.

ezra-g’s picture

nyway I hesitate to use imagecache-related tokens by default since that would add a dependency on imagecache.

Given that we're dependent on tokenized content in the DB, it seems like ImageCache is a solid solution. Considering it's large # of installs in D6 contrib and inclusion in D7 core, it seems unlikely that this would be a problem for folks.

icecreamyou’s picture

Well it doesn't make much of a difference, the fact is there aren't any imagecache tokens in the first place so we still don't have a solution.

One alternative option would be a new custom token that automatically uses imagecache if available and doesn't if it's not installed.

ezra-g’s picture

StatusFileSize
new1.11 KB

Here's a start that combines the patch in #1 with a new block of code that when Facebook_status and ImageCache are enabled and if they are both enabled, uses the same ImageCache preset for user avatars in Activity messages as in Facebook status messages.

icecreamyou’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.