How to print and/or manipulate individual image attributes and suppress width and height via the image.html.twig template I had to get rid of the width and height attributes in my images and wanted to learn better the possibilites of Twig in Drupal.
Copy the image.html.twig file from core/modules/system/templates/ to your theme /templates folder.

If you want to simply hide width and height as image attributes:

{%
set classes = [
    style_name ? 'image-style-' ~ style_name|clean_class,
]
%}
&lt;img{{ attributes|without('width','height').addClass(classes) }} /&gt;


If you want to do further things it would be probably better to use template preprocessing functions in the theme file (because of too much logic here) - so this is more a use case for the possibilities in twig files ...

If you want to hide width and height and also want to hide empty class and alt attributes for example:

{%
    set classes = [
        style_name ? 'image-style-' ~ style_name|clean_class,
    ]
%}
{% set printattributes = attributes.addClass(classes)|without('src','alt','class','width','height') %}
{% set printclass = attributes.class.value() ? 'class="' ~ attributes.class ~ '"' : '' %}
{% set printalt = alt ? 'alt="' ~ alt ~ '"' : '' %}


&lt;img {{ printclass|passthrough }} src="{{uri}}" {{ printattributes }} {{ printalt|passthrough }} /&gt; 


This is also very useful in this context: http://drupal.stackexchange.com/questions/137652/override-image-formatter-html-twig/141340#141340