-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug/Feature: Support fractions in the resize edits #254
Comments
@MartijnKooij Thanks for your feedback. In the next release, we can maybe round up the width and height and enhance the error message if it's needed. |
It would be slightly more convenient to do the rounding server-side as opposed to client-side because in our case we have a couple of clients for the same server. But I'm not sure if that's the right solution for the serverless image handler in general, for all users, what do you think? More meaningful errors would have saved me some digging around logs. So if that's easy to improve it would be appreciated. |
@MartijnKooij we would definitely round up on the server side to deal in case any users provide the floating-point numbers on width and height. |
That would be awesome @beomseoklee ! About the error, I just noticed that in the lambda logs the error is already quite good |
We now round floating point numbers provided to the width and height on resize in v5.2.0. |
Awesome, thanks for the update! |
If possible could you please apply a similar change to overlayWith function left / top when entered as a percentage (ends with p). It appears that after the fixed left / top is calculated from the percentage, the new value is not converted back to an integer and is throwing the same error message when the result is floating point. |
Is your feature request related to a problem? Please describe.
With responsive pages it frequently happens for us that a desired image size will not become an integer value. When you request a resize edit with a decimal value for the width or height the service throws an exception.
Describe the feature you'd like
Apart from being quite hard to find, the error could be a bit more informative if this is indeed a hard requirement.
If possible downstream, the service should either do its best to actually support fractions when resizing, or to round the unsupported fractions for the client.
Additional context
Example of a resize edit with fractions.
The text was updated successfully, but these errors were encountered: