JSFiddle - React, Tailwind, and code Playground

HTML

<table>
  <tr class="trclass">
   <td class ="tdc">
     <img src="/images/products/nophoto_s.jpg"> To Go
    </td>
  </tr>
  <tr class="trclass">
   <td class ="tdc">
     <img src="/images/products/XXX.jpg"> To Stay
    </td>
  </tr>
  <tr class="trclass">
   <td class ="tdc">
     <img src="/images/products/nophoto_s.jpg"> To Go
    </td>
  </tr>
  </table>
<input type='button' id='btn' value='remove' />

JavaScript

$(function(){
    $("#btn").click(function() {

        $("tr").filter(function() {
           return $(this).find("img[src*='nophoto_s.jpg']").length > 0;
        }).remove(); 
        
    });
});