I have an image style set for all my nodes for teasers. There is one view that I need it to display differently. Is there a way I can alter in code?

I know that I can just change my setting from Content to Field and modify the image style that way but I am looking for a way that I can do it in code.

1 Answer 1


While I would generally just access this from the field output type from the View. I would recommend looking into some theme adjustments (and preprocessing Views). Since you are outputting content to the Teaser, you could add some additional verification from the template (https://www.drupal.org/node/53464).

Some helpful links would be:

Your Answer

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

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