It would be great if this module implemented the Token API to update an imagefield hooks with the proper path to the cropped image.
I couldn't figure out how to do it generically, but I did figure out how to do it for a single field (with the machine name "field_articleimage") in the "article" content type. I placed the following code into a custom module:
function techwell_stories_tokens_alter(array &$replacements, array $context) {
$options = $context['options'];
if (isset($options['language'])) {
$url_options['language'] = $options['language'];
$language_code = $options['language']->language;
}
else {
$language_code = NULL;
}
$sanitize = !empty($options['sanitize']);
if ($context['type'] == 'node' && !empty($context['data']['node'])) {
$node = $context['data']['node'];
if ($node->type == 'article') {
// Alter the [node:field_articleimage] token, and replace it with the proper path
// from the imagefield_crop module when viewing the full node.
if (isset($context['tokens']['field_articleimage']) && ($context['options']['view_mode'] == 'full')) {
$items = field_get_items('node', $node, 'field_articleimage');
$replacements[$context['tokens']['field_articleimage']] = file_create_url($items[0]['uri']);
}
}
}
}It works for me, but use at your own risk.
-mike