compare url instead
removed remove line, and $context reference is now just the image
updated the selected for thumbnail search, removed the setpostthumbnailifnotset
removed exit