If you need the first match, use: `querySelector('span[data-type=img]')`