Fix webp size when used on image.fullsize #7502

Open
opened 2026-02-05 13:05:44 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @webysther on GitHub (Oct 12, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

When select WebP for fullsize I got this error:

[Nest] 25165  - 10/12/2025, 3:31:24 AM   ERROR [Microservices:{"id":"c7f33086-bc99-469f-8860-2d0b8cff7ac8","source":"upload"}] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: Processed image is too large for the WebP format
Error: Processed image is too large for the WebP format
    at Sharp.toFile (/app/immich/server/node_modules/sharp/lib/output.js:90:19)
    at MediaRepository.generateThumbnail (/app/immich/server/dist/repositories/media.repository.js:105:14)
    at MediaService.generateImageThumbnails (/app/immich/server/dist/services/media.service.js:205:48)
    at async MediaService.handleGenerateThumbnails (/app/immich/server/dist/services/media.service.js:114:25)
    at async JobService.onJobStart (/app/immich/server/dist/services/job.service.js:156:28)
    at async EventRepository.onEvent (/app/immich/server/dist/repositories/event.repository.js:126:13)
    at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)

This is caused by the format WebP to not be able to create bigger images than 16383x16383: https://developers.google.com/speed/webp/faq?hl=pt-br#what_is_the_maximum_size_a_webp_image_can_be

...
"image": {
  "colorspace": "p3",
  "extractEmbedded": true,
  "fullsize": {
    "enabled": true,
    "format": "webp",
    "quality": 100
  }
...

In this case don't allow use of webp for fullsize will fix the problem or make a error a bit better.

The OS that Immich Server is running on

Docker

Version of Immich Server

v1.131.3

Version of Immich Mobile App

v1.0.0

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

No response

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

  1. Add a bigger than 16383 image
  2. Change the image.fullsize for webp
  3. Run scan for creation of thumb
    ...

Relevant log output


Additional information

No response

Originally created by @webysther on GitHub (Oct 12, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug When select WebP for fullsize I got this error: ```log [Nest] 25165 - 10/12/2025, 3:31:24 AM ERROR [Microservices:{"id":"c7f33086-bc99-469f-8860-2d0b8cff7ac8","source":"upload"}] Unable to run job handler (thumbnailGeneration/generate-thumbnails): Error: Processed image is too large for the WebP format Error: Processed image is too large for the WebP format at Sharp.toFile (/app/immich/server/node_modules/sharp/lib/output.js:90:19) at MediaRepository.generateThumbnail (/app/immich/server/dist/repositories/media.repository.js:105:14) at MediaService.generateImageThumbnails (/app/immich/server/dist/services/media.service.js:205:48) at async MediaService.handleGenerateThumbnails (/app/immich/server/dist/services/media.service.js:114:25) at async JobService.onJobStart (/app/immich/server/dist/services/job.service.js:156:28) at async EventRepository.onEvent (/app/immich/server/dist/repositories/event.repository.js:126:13) at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) ``` This is caused by the format WebP to not be able to create bigger images than 16383x16383: https://developers.google.com/speed/webp/faq?hl=pt-br#what_is_the_maximum_size_a_webp_image_can_be ```json ... "image": { "colorspace": "p3", "extractEmbedded": true, "fullsize": { "enabled": true, "format": "webp", "quality": 100 } ... ``` In this case don't allow use of webp for fullsize will fix the problem or make a error a bit better. ### The OS that Immich Server is running on Docker ### Version of Immich Server v1.131.3 ### Version of Immich Mobile App v1.0.0 ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Device make and model _No response_ ### Your docker-compose.yml content ```YAML N/A ``` ### Your .env content ```Shell N/A ``` ### Reproduction steps 1. Add a bigger than 16383 image 2. Change the image.fullsize for webp 3. Run scan for creation of thumb ... ### Relevant log output ```shell ``` ### Additional information _No response_
OVERLORD added the 🗄️server label 2026-02-05 13:05:44 +03:00
Author
Owner

@mertalev commented on GitHub (Oct 12, 2025):

I think removing the option altogether is unnecessary. We could just limit the resolution to this when the target is WebP.

@mertalev commented on GitHub (Oct 12, 2025): I think removing the option altogether is unnecessary. We could just limit the resolution to this when the target is WebP.
Author
Owner

@webysther commented on GitHub (Oct 13, 2025):

I think removing the option altogether is unnecessary. We could just limit the resolution to this when the target is WebP.

Good ideia

@webysther commented on GitHub (Oct 13, 2025): > I think removing the option altogether is unnecessary. We could just limit the resolution to this when the target is WebP. Good ideia
Author
Owner

@meesfrensel commented on GitHub (Dec 8, 2025):

I don't have the time to extensively test this out and write proper test cases, but a similar change as below should probably do the trick.

1e1cf0d1fe/server/src/services/media.service.ts (L302)

const fullsizeOptions = {
  format: image.fullsize.format,
  quality: image.fullsize.quality,
+ size: image.fullsize.format === ImageFormat.Webp ? 16_383 : undefined,
  ...thumbnailOptions,
};
@meesfrensel commented on GitHub (Dec 8, 2025): I don't have the time to extensively test this out and write proper test cases, but a similar change as below should probably do the trick. https://github.com/immich-app/immich/blob/1e1cf0d1feb914fb260b473c862d38127440d0ff/server/src/services/media.service.ts#L302 ```diff const fullsizeOptions = { format: image.fullsize.format, quality: image.fullsize.quality, + size: image.fullsize.format === ImageFormat.Webp ? 16_383 : undefined, ...thumbnailOptions, }; ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#7502