Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have nodes with text and images in the body field. I wish to remove the images from the teaser texts, currently created with the "Summary or Trimmed" field display option.

Is there a hook or similar for altering the field before it's output in the teaser? Or would this require writing a custom field formatter?

share|improve this question
up vote 5 down vote accepted

For Drupal 7, I have had good luck using the Smart Trim module.

Choose the Smart Trimmed field formatter and check the Strip Out HTML checkbox to remove the image tags (and other formatting that you probably don't want in a teaser text).

It also gives you some other handy formatting options (limit to number of words or characters, add "read more" links, etc) and makes the formatting options available for fields in Views, as well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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