[GH-ISSUE #547] Support for -m and -mt flags with Cwebp #201

Closed
opened 2026-02-25 22:34:36 +03:00 by kerem · 4 comments
Owner

Originally created by @vikobeibe on GitHub (Nov 30, 2024).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/547

Originally assigned to: @sadok-f on GitHub.

Flyimg seems to use Cwebp which offers the -mt flag for multithreading, and the -m flag with values ranging 0 to 6 for making tradeoffs between speed and file size. I have found that combining the two with a reasonable -quality setting could speed up encodes up to 2.5x times in my testing setup when compared to not having the flags set. I propose these to be added.

Originally created by @vikobeibe on GitHub (Nov 30, 2024). Original GitHub issue: https://github.com/flyimg/flyimg/issues/547 Originally assigned to: @sadok-f on GitHub. Flyimg seems to use Cwebp which offers the `-mt` flag for multithreading, and the `-m` flag with values ranging `0` to `6` for making tradeoffs between speed and file size. I have found that combining the two with a reasonable `-quality` setting could speed up encodes up to 2.5x times in my testing setup when compared to not having the flags set. I propose these to be added.
kerem 2026-02-25 22:34:36 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@sadok-f commented on GitHub (Dec 2, 2024):

Thank you @vikobeibe for suggesting these options.
I think it's a good idea to add the -mt flag to the base command for converting to Webp format (the wrapper for ImageMagick would be -define webp:thread-level=1).
Regarding the method flag (-m), it seems the default value is 4, we can add another URL variable to set this value, it could be webpm_3 for example, what do you think?

<!-- gh-comment-id:2510855942 --> @sadok-f commented on GitHub (Dec 2, 2024): Thank you @vikobeibe for suggesting these options. I think it's a good idea to add the `-mt` flag to the base command for converting to Webp format (the wrapper for ImageMagick would be `-define webp:thread-level=1`). Regarding the method flag (`-m`), it seems the default value is `4`, we can add another URL variable to set this value, it could be `webpm_3` for example, what do you think?
Author
Owner

@vikobeibe commented on GitHub (Dec 4, 2024):

Sorry for the slow response. Yes this sounds great, thank you!

<!-- gh-comment-id:2516982504 --> @vikobeibe commented on GitHub (Dec 4, 2024): Sorry for the slow response. Yes this sounds great, thank you!
Author
Owner

@sadok-f commented on GitHub (Dec 19, 2024):

@vikobeibe checkout the latest release 1.7.1 that add the support for the
-m and -mt flags.
Thank you for your feature request!

<!-- gh-comment-id:2553397921 --> @sadok-f commented on GitHub (Dec 19, 2024): @vikobeibe checkout the latest release [1.7.1](https://github.com/flyimg/flyimg/releases/tag/1.7.1) that add the support for the -m and -mt flags. Thank you for your feature request!
Author
Owner

@sadok-f commented on GitHub (Apr 28, 2025):

Hi @vikobeibe
If your company/organisation is using Flyimg, it would be great to have you listed in our ADOPTERS.md file!
Feel free to add your entry — we'd love to highlight your support.
Thank you!

<!-- gh-comment-id:2834534043 --> @sadok-f commented on GitHub (Apr 28, 2025): Hi @vikobeibe If your company/organisation is using Flyimg, it would be great to have you listed in our [ADOPTERS.md file](https://github.com/flyimg/flyimg/blob/main/ADOPTERS.md)! Feel free to add your entry — we'd love to highlight your support. Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flyimg#201
No description provided.