You can use the HTTP API of DiceBear as Gravatar default image. But before that, let's take a look at the conditions for Gravatar default images:
✅ MUST be publicly available (e.g. cannot be on an intranet, on a local development machine, behind HTTP Auth or some other firewall etc). Default images are passed through a security scan to avoid malicious content.
✅ MUST be accessible via HTTP or HTTPS on the standard ports, 80 and 443, respectively.
⚠️ MUST have a recognizable image extension (jpg, jpeg, gif, png)
⚠️ MUST NOT include a querystring (if it does, it will be ignored)
Usually we set options in the query string, such as the seed. Since a query string is not allowed by Gravatar, the HTTP-API allows you to specify the options in the path. Just replace the question mark with a slash.