Skip to content

Commit

Permalink
Default Profile Picture Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnGrubba committed Sep 29, 2024
1 parent 2c25e5d commit ed21cc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/configuration/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Make sure that all parameters are set correctly before starting the service.
| `account_features.profile_picture.resize.quality` | **Datatype:** Integer <br> **Default:** `80` <br> Optimizing Quality for the Profile Picture. |

!!! Info "Profile Pictures"
All Profile Pictures get served under `/cdn/<user_id>.webp`. This is a public endpoint and can be used in your frontend to display the profile picture of a user. The User ID can be found in many endpoints like `/profile`.
All Profile Pictures get served under `/cdn/<user_id>.webp`. This is a public endpoint and can be used in your frontend to display the profile picture of a user. The User ID can be found in many endpoints like `/profile`. If a user doesn't have a profile picture, a default image will be served. (default.webp in the `uploads` directory specified in the docker-compose). You have to create the `default.webp` file yourself.

!!! Note "Additional Fields"
The `allow_add_fields_on_signup` makes it possible to add custom fields to the signup process. If you don't set the fields that are allowed here on signup, you can't update them later, except you also have them in `allow_add_fields_patch_user`.
Expand Down
1 change: 1 addition & 0 deletions src/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
app.mount("/cdn", StaticFiles(directory="/uploads", check_dir=False))


# Profile Picture 404 Default Redirect Middleware
@app.middleware("https")
async def mdlware(request: Request, call_next):
response: Response = await call_next(request)
Expand Down

0 comments on commit ed21cc2

Please sign in to comment.