I have a Template file for a specific content type with several images, and to prevent the user from uploading more image sizes, I have an image style rule to crop out the image to 140x140 pixels.

My question is, what would the image style method call look like, to return the altered image back to the template, if provided the field reference from the node in either a $node->field_image or a $content[field_image] call in the template?

  • 1
    If you want to print an image field with an image style preset, see this answer: drupal.stackexchange.com/a/42062/1899 . If you want to crop the image when uploading, and discard the original image, you will need a module for that.
    – AKS
    Dec 19, 2014 at 2:21
  • Thanks for the followup. Can you think of a reason why the return result from theme would return a broken image? Dec 19, 2014 at 16:52


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.