title: How to remove product images in Magento 2
body: <p>I'm trying to remove product images in Magento 2, but all I can find is how to do it in Magento 1, which is very different.</p>
  
  <p><strong>Here is what I found for Magento 1:</strong></p>
  
  <pre><code>if ($product-&gt;getId()){
      $mediaApi = Mage::getModel("catalog/product_attribute_media_api");
      $items = $mediaApi-&gt;items($product-&gt;getId());
      foreach($items as $item)
          $mediaApi-&gt;remove($product-&gt;getId(), $item['file']);
  }
  </code></pre>
  
  <p>Anyone know how to accomplish this?</p>