Hi, I noticed that using Imagecache and setting to "Display PRESET_NAME image" displayed image don't have any "Class" attribute setted.
I changed imagecache.module in line 630/631 to
default:
return theme('imagecache', $presetname, $item['filepath'], $item['data']['alt'], $item['data']['title'], array('class' => $class));
solves my issue.
Maybe the preferred solution to have a setting for preset about "class" or other HTML attributes.
Regards
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | imagecache_322155.patch | 949 bytes | drewish |
| #3 | imagecache_add_display_class.patch | 815 bytes | thepanz |
Comments
Comment #1
drewish commentedplease roll a proper patch http://drupal.org/patch
Comment #2
thepanz commented-- duplicated comment ---
Comment #3
thepanz commentedThis is my patch. It's a simple one, but maybe themers or sites admin need more advanced way to set an imagecache IMG class attribute!
Regards!
my patch is against latest HEAD CVS version (I didn't find any drupal--6 branch).
Comment #4
thepanz commentedI forgot to change issue status.
Comment #5
drewish commentedThanks, removed an extra space (that was there before the patch) and committed the attached to HEAD.
Comment #6
drewish commentedmarked #309221: image class not showing in teaser as a duplicate