Strip the query string off the URL when checking for image matches