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
@@ -6,7 +6,7 @@
"el-GR": 96,
"en": 100,
"es-AR": 96,
"es-CL": 98,
"es-CL": 97,
"es": 96,
"fa": 96,
"fr": 100,
@@ -18,7 +18,7 @@
"pl": 98,
"pt-BR": 96,
"ru": 98,
"sv-SE": 97,
"sv-SE": 96,
"uk": 96,
"ur": 2,
"zh-Hans": 98,
+6
View File
@@ -8699,6 +8699,12 @@ export function useAFFiNEI18N(): {
* `Email service is not configured.`
*/
["error.EMAIL_SERVICE_NOT_CONFIGURED"](): string;
/**
* `Image format not supported: {{format}}`
*/
["error.IMAGE_FORMAT_NOT_SUPPORTED"](options: {
readonly format: string;
}): string;
/**
* `Query is too long, max length is {{max}}.`
*/
@@ -2177,6 +2177,7 @@
"error.SSRF_BLOCKED_ERROR": "Invalid URL",
"error.RESPONSE_TOO_LARGE_ERROR": "Response too large ({{receivedBytes}} bytes), limit is {{limitBytes}} bytes",
"error.EMAIL_SERVICE_NOT_CONFIGURED": "Email service is not configured.",
"error.IMAGE_FORMAT_NOT_SUPPORTED": "Image format not supported: {{format}}",
"error.QUERY_TOO_LONG": "Query is too long, max length is {{max}}.",
"error.VALIDATION_ERROR": "Validation error, errors: {{errors}}",
"error.USER_NOT_FOUND": "User not found.",