Adult content upload is the biggest threat to any image hosting site, especially site which relay on Google Adsense for revenue. The only way to overcome this threat is to moderate all images uploaded to the site. However, monitoring a website 24x7 is not practical and we need a moderation system before images go public.
The image moderation feature is yet to be implemented in Chevereto, but this can be easily implemented with few code editing. This method will automatically flag all uploaded images as NSFW by default instead of asking users to mark it. Only once it is flagged as safe it will appear in Explore or ads displayed.
Phase 1: Mark all images uploaded as NSFW by default
Add $_REQUEST['nsfw'] = 1; after line 82 of /app/routes/route.json.php and upload the new file to to /app/routes/overrides
Phase 2: Remove NSFW option from anywhere uploader and replace it with a warning.
Replace line 153 of /app/themes/Peafowl/snippets/anywhere_upload.php with below code. Upload the new file to /app/themes/Peafowl/overrides/snippets.
Phase 3: Moderating large number of images
My site gets around 5K images uploaded every day and to bulk moderate these images I follow below steps.
Step 1: Temporarily increase no: of images to show in listing to 500.
Step 2: Access the admin image explore page via this URL http://yourdomain.com/explore/?list=images&sort=date_desc&page=1
Step 3: Scroll down the page to find any adult content.
Step 4: Once you have removed the Adult contents, use the select all images options and mark all images as Safe from drop down option.
Step 5: At bottom of page, click on next page button and repeat the steps till you flag all newly uploaded images as safe.
Step 6: Once all images are moderated, reset the listing setting to previous value.
I have been using this method on my site for the past 6 months and help me removing all adult content and keep the site clean. Every day I have to spend around only 20 mins to mark 5K images as safe.
Hope this will help others too.
Update: I am retiring this in favour of new AI-based image moderation technique.
The image moderation feature is yet to be implemented in Chevereto, but this can be easily implemented with few code editing. This method will automatically flag all uploaded images as NSFW by default instead of asking users to mark it. Only once it is flagged as safe it will appear in Explore or ads displayed.
Phase 1: Mark all images uploaded as NSFW by default
Add $_REQUEST['nsfw'] = 1; after line 82 of /app/routes/route.json.php and upload the new file to to /app/routes/overrides
Code:
// Upload to website
$_REQUEST['nsfw'] = 1;
$uploaded_id = CHV\Image::uploadToWebsite($source, $logged_user, $_REQUEST);
Phase 2: Remove NSFW option from anywhere uploader and replace it with a warning.
Replace line 153 of /app/themes/Peafowl/snippets/anywhere_upload.php with below code. Upload the new file to /app/themes/Peafowl/overrides/snippets.
Code:
<div class="margin-10"><span rel="tooltip" data-tiptip="top" title="<?php _se('Adult contents uploaded will be deleted'); ?>"><name="upload-nsfw" id="upload-nsfw" class="margin-right-5" value="1"><label for="upload-nsfw"><?php _se('Note: Adult content not allowed'); ?></label></span></div>
Phase 3: Moderating large number of images
My site gets around 5K images uploaded every day and to bulk moderate these images I follow below steps.
Step 1: Temporarily increase no: of images to show in listing to 500.
Step 2: Access the admin image explore page via this URL http://yourdomain.com/explore/?list=images&sort=date_desc&page=1
Step 3: Scroll down the page to find any adult content.
Step 4: Once you have removed the Adult contents, use the select all images options and mark all images as Safe from drop down option.
Step 5: At bottom of page, click on next page button and repeat the steps till you flag all newly uploaded images as safe.
Step 6: Once all images are moderated, reset the listing setting to previous value.
I have been using this method on my site for the past 6 months and help me removing all adult content and keep the site clean. Every day I have to spend around only 20 mins to mark 5K images as safe.
Hope this will help others too.
Update: I am retiring this in favour of new AI-based image moderation technique.
Last edited: