1

In my content type, I am using an image field.

But in display, I want to show this image twice. Once with large style, and another with medium.

How can I do this?

2

If you're displaying your field programmatically you've to use:
For Large :

<?php echo theme('image_style', array(
    'style_name' => 'large',
    'path' => $node->field_image['und'][0]['uri'],
    'alt' => t('Image'),
    'title' => t('Title'))); ?>

For Medium :

<?php echo theme('image_style', array(
    'style_name' => 'medium',
    'path' => $node->field_image['und'][0]['uri'],
    'alt' => t('Image'),
    'title' => t('Title'))); ?>

Your can also call any format you added on back office his name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.