Solution design

To achieve the ability to screen images before we display them to the users on our application, we are going to do the following:

  1. On the view-thread page, we are going to provide a button next to Reply named Reply with Image to keep things simple
  2. The user is going to upload an image to our server using this interface
  3. The image will be saved on our servers temporarily
  1. The uploaded images will then be sent to the Google Cloud Vision API to detect labels and safe search annotations
  2. If the safe search annotations return POSSIBLE for the adult, medical, or violence categories, we do not allow the user to upload the image
  3. If the image is safe, we then upload it to Cloudinary, an image hosting service
  4. Once the upload to Cloudinary ...

Get Google Cloud AI Services Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.