Conditional field display in node template I have a specific content type that I am overwriting the template node--contenttype.html.twig. 

This conent type has 4 fields. 


Title 
Body
Image
Video


I am trying to hide the image field from displaying if VIDEO field has value. Which I am doing by using this code in custom twig template. 

{% if node.field_video is not empty %}
{{ content.field_video }}
{% else %}
  {{ content.field_image }}
{% endif %}


The only problem is that I get one of the fields printed as needed plus I get both fields shown. 

Video filed is displayed, plus I get an image and video shown again. Wherever those fields are positioned in MANAGE DISPLAY. 

If I disable the two fields in MANAGE DISPLAY then, nothing shows up at all. 

How can this be fixed?
You wrote that you are using Twig conditions to selectively print fields, but they show up twice now. This most likely is, because your template still renders the entire content variable somewhere like {{ content }}.

You can easily avoid the fields being rendered twice by using the without Twig filter. Locate the {{ content }} part in your template and alter it to

{{ content|without('field_video', 'field_image') }}