Which works fine for you if you just specified a size for your nvarchar extracted from XML.
SELECT ID, Data from Items where Data.value('(//data/add[@key="images"]/@value)[1]', 'nvarchar(100)') Like '%img%'
Here I indicated 100 , you can set it to something more suitable for your situation. Without a size, the column will have a size of 1 .
source share