d7e0d7eada
New users get a Gravatar-backed avatar automatically (computed from email at signup); users can upload a custom photo instead via Settings, or revert to the Gravatar/initials fallback. avatarUrl stays the single resolved value (custom photo, OAuth photo, or precomputed Gravatar URL) so every existing avatar-rendering spot across the app needs zero changes. - users.hasCustomAvatar tracks whether avatarUrl is a real upload vs a computed Gravatar fallback, so "remove photo" knows what to revert to. - New /api/v1/upload/avatar-presign route (session-scoped, generic — the existing recipe-photo presign route required a recipeId). - CSP img-src needed www.gravatar.com added, or every browser blocks the fallback avatar outright. - Settings page now reads avatarUrl from a fresh DB query instead of Better Auth's session object — the session cookie cache (5 min TTL) was serving a stale image right after upload, showing the initials fallback until the cache happened to expire. Verified locally: signup auto-sets a Gravatar URL, upload persists across reload, remove correctly reverts to Gravatar/initials.
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Deploy on Vercel
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.