I'm retrieving user data from Google using the Passport Google Strategy (OAuth 2.0). This works fine except when the logged-in user does not have an explicitly set profile picture. In such cases, Google returns a default image with the user's first-name initial:
I want to be able to tell if the image returned by the API is a real image or something like this. How do I accomplish this? There's a similar question here but the answer is outdated since Google no longer seems to offer an isDefault
flag. Nor does it have a consistent URI for the default silhouette because the auto-generated image is different for different users depending on their initials. Is there any alternative flag offered by Google OAuth 2.0 that tells me if the image is an auto-generated one?