Google Cloud Vision enables developers to understand the content of an image by encapsulating powerful machine learning models in an easy-to-use REST API. This allows Drupal to use the Google Cloud Vision API across the site.
- Ensures uploaded images uploaded with image fields do not contain adult content
- Saves Google Vision Keys safely through Lockr
-
Visit the Google Cloud Vision API and enable the API
-
Head over to the Google Cloud Console Service Account Credentials and create an API key
-
Create the JSON service key
-
In
/admin/config/system/keys
, add a new key named "google", and enter in the JSON service account key you acquired -
Install the Google Cloud Vision module as you would install any Drupal 8 module.
-
Enable the Google Cloud Vision module.
-
Visit
/admin/config/google-cloud-vision/settings
and set both a:- Key Machine Name: This is the name of the key that will be used in the Key module. You had used "google" for this.
- Google Project ID: This is the name of the application that will be used on the Google Cloud Vision side
-
Visit
/google-cloud-vision/demo
and ensure Google Cloud Vision is functioning properly.
Once the module is installed and configured properly, uploading an image to an image field will have Google Cloud Vision check the image securely.