Bitcoin has no file viewer.
Bitcoin has no concept of what’s an image or a text or anything else, the only way someone would know that content is “illegal” would be to look at it with third party software. Then you are asking the node runners to trust a third party that the content is illegal...