question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve fallback logic of `max_bytes` filter

See original GitHub issue

Thumbor request URL

http://localhost:8888/unsafe/filters:max_bytes(7500)/https%3A%2F%2Fgithub.com%2Fthumbor%2Fthumbor%2Fraw%2Fmaster%2Fexample.jpg

Expected behaviour

When I try to cap the maximal file size with an unreasonable small number in the max_bytes filter, I expect Thumbor to return an image with the smallest possible file size (current results).

Actual behaviour

Thumbor stops the downsizing process when the quality drops under 10 and returns the initial image (initial_results), which leads to an unexpected high file size.

https://github.com/thumbor/thumbor/blob/af7954b72c5585b0081e49fd4ae25036fae41806/thumbor/handlers/__init__.py#L595-L601

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
macrozonecommented, Aug 10, 2020

@timonweber i saw that you can combine both quality and max_bytes filters. So at leasts you can define a “max quality” with quality.

At least a workaround in some cases

0reactions
github-actions[bot]commented, Jan 28, 2022

This issue was closed because it has been stale for 5 days with no activity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

All Configurations | Apache Hudi
This page covers the different ways of configuring your job to write/read Hudi tables. At a high level, you can control behaviour at...
Read more >
Kafka Consumer Configurations for Confluent Platform
The maximum record batch size accepted by the broker is defined via message.max.bytes (broker config) or max.message.bytes (topic config).
Read more >
spring-cloud/spring-cloud - Gitter
i was getting this error for a simple RestController (i post a large json string). status: 500 Internal Server Error: Exceeded limit on...
Read more >
auto-tikv/tikv_template.yml at master - GitHub
Max bytes that snapshot can be written to disk in one second. ## It should be set based on your disk performance. #...
Read more >
Inspections - Automattic/jetpack - Measure and Improve Code ...
Clear current filters, and sorts. Initiated By: Kolja Zuelsdorf ... Branch: fix/in-place-connection-fallback-for-secondary-use. Filter by Branch.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found