How to Block NSFW Content on Your WordPress Website
Creating content is hard, and yet, content is what drives your website visits and develops your traffic. This is why even a small website often has a group of people behind it, ensuring smooth running and a constant flow of content. But there are other ways for websites to gain access to content visitors will want to see: user-generated content.
Allowing user-submitted posts on your website is one, setting up an online forum is another, while WordPress‘s own comments functionality is a third way for user-generated content to end up on your website, and that’s only scratching the surface. But what if your visitors try to upload content you do not approve of? Your website is your own responsibility, and if you don‘t want NSFW content on your website, you need to find ways to filter it. This is what this tutorial is all about. But before we show you how to set up a filter for NSFW content, we‘d like to discuss what the phrase even means. Here‘s what we‘d like to talk about:
NSFW stands for “Not Safe For Work”. Of course, the exact circumstances, expectedly, vary from workplace to workplace, and aren’t even limited to just work – the abbreviation typically refers to graphic internet content intended for personal viewing.
This broad definition may encompass textual, pictorial, or video content inappropriate for the workplace for various reasons such as nudity, violence, or gore. For the purposes of this tutorial, we will take NSFW content to mean erotic images, be they photographs or graphics, as it is the kind of inappropriate content most likely to be uploaded and shared due to its ubiquity and popularity.
You have set up a website, and have built a community which interacts and generates interest in your website and drives traffic to it. Why should you care if they post some NSFW content every now and again? Well, there are several reasons, in fact, but they boil down to two:
Firstly, depending on the jurisdiction, freely sharing certain content may not only be workplace inappropriate – it may well be illegal, and a website owner or operator might be liable. You should have a handle on what goes on your website at all times. Even if sharing NSFW content is not illegal in general terms, most jurisdictions have outlawed sharing it with children and minors.
Secondly, it may be off-putting for some visitors. If your website and your community isn‘t specifically formed around sharing what we termed NSFW content, you might find yourself losing traffic over puerile conduct of a minority of your visitors. Specifically, if you are trying to build a family-friendly environment, you need to have a mechanism in place to control the content of that environment. Otherwise, you risk problems with, say, outraged parents who might use parental controls to block your website even if its primary purpose is not sharing of NSFW content.
If you want to filter your user-uploaded content, you will need some help. Fortunately, the team behind ModerateContent.com can help. They run a commercial service which uses AI to filter out sensitive content.
In order to integrate their service with WordPress, they have developed a plugin (currently out of date, but not obsolete). The plugin is called Image (NSFW) and you need to install and activate it in order to start filtering out NSFW content. The plugin uses ModerateContent‘s free API in order to filter out any inappropriate content.
Once you have done that, you need to configure your plugin. You can access the plugin‘s settings panel by navigating to NSFW Image/Settings.
To register your website for ModerateContent‘s free pricing plan, click the Register – One Click (Free) buton.
You will then have enabled the settings panel. Here you will find the free API key already input, and you can test it to see whether the plugin works by clicking on the Test button.
The options below allow you to the plugin to automatically filter each uploaded image. Enable Debug Logging will allow you to see the plugin‘s logs in detail, Enable Action Remove enables the plugin to automatically remove an offending image, Enable Action Email allows you to notify an admin when an inappropriate image is detected, the Warn When Image control governs the rating for which the plugin reacts to the image, while Manual Review Level lets you control at which rating your admins will need to review an image.
In the subsequent section, you need to enable the plugin to work for each of the events during which a picture may be uploaded. These triggers are all set to True by default, meaning that the plugin will always react. If you, for any reason, want to enable free sharing of NSFW content in certain contexts, you can enable it. Once you are satisfied with your settings, click Save Changes.
Once the plugin starts filtering your users‘ images, you will be able to find them by navigating to Image (NSFW)/Images.
In Conclusion
As you can see, there are plenty of reasons and at least one easy way to filter out all the NSFW content (or at least image content) from your website. A thing you need to remember, though, is that AI is (thus far) no replacement for manual reviewing of data, and you may end up blocking otherwise allowable content. Another thing to consider is that visitors will likely appreciate knowing the rules in advance: fair is fair, after all. So we suggest notifying them that their posts will be subject to automatic filtering. Still, whether you don‘t want to fall afoul of the law or easily outraged people, now you know how to do it.