Adding attributes to the <img> tag of an image field in Drupal 8
While theming an image field in Drupal 8, you might have a need to add additional html attributes to the <img /> tag itself. We've found the following snippet will allow you to add these attributes within your field.html.twig file: