Skip to content

Are VIPS_MAX_WIDTH and VIPS_MAX_HEIGHT restrictions on the source or ouput image? #533

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

Open
EyePulp opened this issue Apr 2, 2025 · 1 comment

Comments

@EyePulp
Copy link
Contributor

EyePulp commented Apr 2, 2025

A question on VIPS_MAX_WIDTH, VIPS_MAX_HEIGHT and VIPS_MAX_RESOLUTION;

This seems like a really dumb thing to have to ask, but after re-reading the docs, I still wasn't sure. Are these arguments limiting the allowed size of the actual input/source image or the allowed output parameters/dimensions?

When the docs say

imagor checks the image type and its resolution before the actual processing happens

To me that reads that it's checking the source image -- otherwise if it's looking at the requested output, then I'd say something like

imagor checks the requested image type and resolution parameters before the actual processing happens

Happy to submit a PR to this effect if it's the latter case.

Thanks!

@EyePulp
Copy link
Contributor Author

EyePulp commented Apr 3, 2025

Adding this tidbit -

We've got an example of a source image that's over the VIPS_MAX_WIDTH, but that has a .jpeg extension and returns content-type: binary/octet-stream. It gets processed without issue.

Compared to another oversized source image, with a .jpg extension which returns content-type: image/jpg, and any imagor requests for processing result in the {"message":"maximum resolution exceeded","status":422} response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant