feat: add imageGeneration param (#311)

* Update file_config.mdx

* Update file_config.mdx
This commit is contained in:
Marco Beretta
2025-05-27 22:21:19 +02:00
committed by GitHub
parent 6fa8a6daa2
commit fc2296a459

View File

@@ -4,11 +4,12 @@
The `fileConfig` object allows you to configure file handling settings for the application, including size limits and MIME type restrictions. This section provides a detailed breakdown of the `fileConfig` object structure.
There are 3 main fields under `fileConfig`:
There are 4 main fields under `fileConfig`:
- `endpoints`
- `serverFileSizeLimit`
- `avatarSizeLimit`
- `imageGeneration`
**Notes:**
@@ -50,7 +51,9 @@ fileConfig:
- "image/.*"
serverFileSizeLimit: 1000
avatarSizeLimit: 2
imageGeneration:
percentage: 100
px: 1024
```
## serverFileSizeLimit
@@ -66,7 +69,6 @@ fileConfig:
serverFileSizeLimit: 1000
```
## avatarSizeLimit
<OptionTable
@@ -80,6 +82,35 @@ fileConfig:
avatarSizeLimit: 2
```
## imageGeneration
<OptionTable
options={[
['imageGeneration', 'Object', 'Settings related to image generation output quality and dimensions.', 'Allows configuration of either output size as a percentage relative to some base size or as an explicit pixel dimension.'],
]}
/>
`imageGeneration` supports the following parameters:
- `percentage` (Integer)
- The output size of the generated image expressed as a percentage (e.g., `100` means 100% of base size).
- Use this to scale the output image relative to a default or original size.
- `px` (Integer)
- Specifies the output image dimension in pixels (e.g., `1024`).
- Use this to explicitly set the output size of the generated image regardless of base size.
You may set only one of these parameters (`percentage` or `px`), not both, depending on your use case
Example configuration:
```yaml filename="fileConfig / imageGeneration"
fileConfig:
imageGeneration:
percentage: 100
px: 1024
```
## endpoints
<OptionTable