How to add Colorbox to a field in a twig template? I have a site with various products on it. So I created node--product.html.twig. I then removed this from my twig template:

{{content}}


Because I want to display fields myself in a custom format, without relying on Drupal's built-in display. So for the most part this was easy, as I could do this:

&lt;img src="{{ file_url( node.field_product_images.0.entity.uri.value | image_style('shop_thumb_400_x_400')  ) }}" alt="" /&gt;


This works perfectly. But my problem is that I want the user to be able to click on this image and see it in a modal view, but USING the Colorbox module. 

Is there another way to output this field in the twig template so that it automatically loads colorbox and everything that is needed?
You really would want to use:

{{ content.field_product_image }}

The field display setting will pass the image style to it, and I assume colorbox has a field formatter or tie in here as well. Supply a field Twig template to strip extraneous markup divs.