Serve fallback image instead of 404 from r2

I'm using R2 to serve user avatars. If no avatar exists in the bucket for the given user ID, I'd like to return a default avatar as the 404 response. Is there any way to do this without using workers?
Was this page helpful?