They want thumbnails of images to appear in teaser views, and larger images to appear when the entire node body is shown.
The best way IMO is to use CCK and imagefield/imagecache. Then you have an "image" field and can call a different imagecache preset in your node-content_whatever.tpl.php file when $teaser is true/false. This is what I have used in the past for this functionality and works quite well. If you need to use img_assist (using inline images), you could do this in hook_nodeapi() as Steven says and shrink down any images, but this method is a bit clunkier. Rob Roy Barreca Founder and COO Electronic Insight Corporation http://www.electronicinsight.com rob@electronicinsight.com Dave Cohen wrote:
I have a client using img_assist to add inline images. They want thumbnails of images to appear in teaser views, and larger images to appear when the entire node body is shown. Others have requested the same sort of thing here: http://drupal.org/node/107801.
I was hoping to accomplish this by hacking the img_assist filter to change its behavior when a teaser is being generated as opposed to a full body. But this information (whether a teaser is being generated or not) is not available in hook_filter.
Is there any way for me to accomplish this? I cannot think of a clean way so I wonder, should more parameters be passed to the check_markup and hook_filter functions?
Apologies if this is a FAQ, and thanks for any advice,
-Dave