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;
}| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 1426576-activity-log-avatar-resize.patch | 1.11 KB | ezra-g |
| #1 | image_resize-1426576-01.patch | 317 bytes | ay13 |
Comments
Comment #1
ay13 commentedRemoves the set width on the image container so images can be any size.
Comment #2
icecreamyou commentedWhen 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.
Comment #3
ezra-g commentedGiven 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.
Comment #4
icecreamyou commentedWell 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.
Comment #5
ezra-g commentedHere'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.
Comment #6
icecreamyou commentedCommitted fix to dev. Thanks!