How can I apply different image style to an image field in Views, based on the condition of some other field of the same content type? I need to print the image with some frame, if some field (checkbox) is true, and with other style if the field is false. Any ideas?



1 Answer 1


Add the image field twice(!) to the fields list. Use the frame style on the first image and the no-frame style on the second. Exclude both fields from display and place them before the checkbox.

Next, rewrite the output of the checkbox field to use [field_image] if the checkbox is checked (normal rewrite) and [field_image_1] if it is not (no result behaviour, Treat 0 as empty).

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.