JSFiddle - React, Tailwind, and code Playground
HTML
<img src="whatever.png" alt="" />
JavaScript
$('img[src$=png]'); // this works ok
$('img[src$=.png]'); // this will crash
<img src="whatever.png" alt="" />
$('img[src$=png]'); // this works ok
$('img[src$=.png]'); // this will crash