public function getFirstImage($content)
    {
        Deprecated::method('3.4');

        $contentType = $content->getContenttype();
        if (!$contentType instanceof ContentType) {
            return null;
        }
        $fields = $contentType->getFields();
        if (!is_array($fields)) {
            return null;
        }

        // Grab the first field of type 'image', and return that.
        foreach ($fields as $key => $field) {
            if ($field['type'] === 'image' && is_array($content->get($key))) {
                return $content->get($key);
            }
        }

        // otherwise, no image.
        return null;
    }