Refuse a fit=outside size whose output exceeds the maximum (closes #257)
check / check (push) Waiting to run

fit=outside scales the source to cover the requested size, and the side
scaled past it was held to no maximum: 1x8192?fit=outside of a 3000x600
source was resized to 40960x8192 and encoded. resize now refuses such an
output with ErrOutputTooLarge before resizing, so both image routes answer
it 400 with the error a size with one side 0 already gets. The other fit
modes make the requested size or one within it. README.md and TODO.md
say so.

Model: opus-5-5
This commit was merged in pull request #259.
This commit is contained in:
2026-10-13 10:44:45 +02:00
parent d8760c40a1
commit afb5dc5d0d
5 changed files with 176 additions and 4 deletions
+3 -1
View File
@@ -265,7 +265,9 @@ once, is refused with 400.
A size with one side `0` has that side scaled to keep the source's proportions,
and is refused with 400 when that side would come out above 8192, the most
either side may be.
either side may be; so is a size with `fit=outside`, which scales the image to
cover the size and so past it on one side, when that side would come out
above 8192.
The source image may be JPEG, PNG, GIF, WebP, AVIF or JPEG XL. The upstream's
`Content-Type` must name its format, and the image's first bytes must match it.