feat(server): add image resize support (#14588)

fix #13842 


#### PR Dependency Tree


* **PR #14588** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Images are now processed natively and converted to WebP for smaller,
optimized files; Copilot and avatar attachments use the processed WebP
output.
* Avatar uploads accept BMP, GIF, JPEG, PNG, WebP (5MB max) and are
downscaled to a standard edge.

* **Error Messages / i18n**
  * Added localized error "Image format not supported: {format}".

* **Tests**
* Added end-to-end and unit tests for conversion, EXIF preservation, and
upload limits.

* **Chores**
  * Added native image-processing dependencies.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-03-07 04:42:12 +08:00
committed by GitHub
parent f34e25e122
commit 86d65b2f64
20 changed files with 743 additions and 29 deletions
+7
View File
@@ -1056,6 +1056,7 @@ export type ErrorDataUnion =
| ExpectToUpdateDocUserRoleDataType
| GraphqlBadRequestDataType
| HttpRequestErrorDataType
| ImageFormatNotSupportedDataType
| InvalidAppConfigDataType
| InvalidAppConfigInputDataType
| InvalidEmailDataType
@@ -1162,6 +1163,7 @@ export enum ErrorNames {
FAILED_TO_UPSERT_SNAPSHOT = 'FAILED_TO_UPSERT_SNAPSHOT',
GRAPHQL_BAD_REQUEST = 'GRAPHQL_BAD_REQUEST',
HTTP_REQUEST_ERROR = 'HTTP_REQUEST_ERROR',
IMAGE_FORMAT_NOT_SUPPORTED = 'IMAGE_FORMAT_NOT_SUPPORTED',
INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR',
INVALID_APP_CONFIG = 'INVALID_APP_CONFIG',
INVALID_APP_CONFIG_INPUT = 'INVALID_APP_CONFIG_INPUT',
@@ -1314,6 +1316,11 @@ export interface HttpRequestErrorDataType {
message: Scalars['String']['output'];
}
export interface ImageFormatNotSupportedDataType {
__typename?: 'ImageFormatNotSupportedDataType';
format: Scalars['String']['output'];
}
export interface ImportUsersInput {
users: Array<CreateUserInput>;
}