Twig attribues.addclass nesting issue
attributes is a variable containing attributes information (class, id, others..) for the main container of the template.
It should usually be used only once.
You can create a new attribute variable like this :
{% set my_attribute = create_attribute() %}|
And you can use it as usual :
&lt;div{{ my_attribute.addClass(image_classes).setAttribute('data-type', 'image') }}&gt;
  {{ content.field_two_column_image }}          
&lt;/div&gt;

More information about using the attributes variable in Twig templates :
https://www.drupal.org/docs/8/theming-drupal-8/using-attributes-in-templates
https://www.drupal.org/docs/8/theming-drupal-8/modifying-attributes-in-a-theme-file
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Template%21Attribute.php/class/Attribute/8.2.x