You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#270 is fixed in v1.2.0, which uses bimg v1.1.0, by fallback to a default ICC profile if no one is specified.
I will keep this issue open since it is still room for future improvement in the API behavior about the underlying idea of smarter format detection mechanism by inferring accepted image using Client Hints HTTP headers.
We seems facing same kind of problem. When trying to convert JPEG (160px x 21600px) into WebP - getting HTTP400 with this inside: {"message":"Error while processing the image: vips2webp: unable to encode","status":400}
Would be great to fallback into JPEG in such cases instead of error.
In our case we send requests with explicit type=webp in query string.
For anyone still following this: ideaplexus/imaginary 2.3.0, a maintained fork of imaginary (Docker images for amd64 and arm64 as ideaplexus/imaginary:2.3.0), answers with a JPEG if the encoder of WebP, AVIF, HEIF or JPEG XL fails on an image, instead of an error; see its FAQ.
Activity
feat(#305, #309, #308, #305. #284)
New release, minor features, bimg upgrade and several fixes (#311)
h2non commentedon Jun 7, 2020
#270 is fixed in
v1.2.0, which usesbimgv1.1.0, by fallback to a default ICC profile if no one is specified.I will keep this issue open since it is still room for future improvement in the API behavior about the underlying idea of smarter format detection mechanism by inferring accepted image using Client Hints HTTP headers.
h2non commentedon Jun 7, 2020
Related feature proposal: #253
n1bs commentedon Jul 28, 2020
Hello,
We seems facing same kind of problem. When trying to convert JPEG (160px x 21600px) into WebP - getting HTTP400 with this inside:
{"message":"Error while processing the image: vips2webp: unable to encode","status":400}Would be great to fallback into JPEG in such cases instead of error.
In our case we send requests with explicit
type=webpin query string.h2non commentedon Jul 28, 2020
Hello @n1bs!
Can you provide some WebP image that is giving you trouble so I can reproduce? I assume you are running the
v1.2.2.A fallback mechanism might be optimal in this case, but I'd rather prefer this behavior to be explicitly requested in the HTTP request contract.
Something like overloading the current
typequery param to host multiple allowed formats with order preference could work nicely here:type=webp,jpeg.Would that work?
mrkurt commentedon Jul 28, 2020
I managed to replicate this with a random jpeg:
https://i.imgur.com/6gBwEjy.jpgThe imaginary params were:
/convert?url=https://i.imgur.com/6gBwEjy.jpg&stripmeta=true&type=webp&quality=80Type with multiple available formats would work great for me.
n1bs commentedon Jul 29, 2020
thanks for the test image, Kurt!
@h2non thanks for the quick look into this! Just to confirm - we're running v1.2.2 and
type=webp,jpegwould work great for us.h2non commentedon Jul 29, 2020
Cool, I will try to ship this feature by the end of the week or early next week. Will keep things posted here!
feat(#315, #309): autorotate / gracefully fallback failed image type …
h2non commentedon Aug 4, 2020
A fix was pushed in
v1.2.3under Docker image tagslatest,1, and1.2.3.There is no change required in terms of URL API consumption.
In case the image encoding fails, it will transparently fall back to JPEG encoding.
You can test it with:
/convert?url=https://i.imgur.com/6gBwEjy.jpg&stripmeta=true&type=webp&quality=80New release, minor features, bimg upgrade and several fixes (h2non#311)
feat(h2non#315, h2non#309): autorotate / gracefully fallback failed i…
tina-junold commentedon Oct 23, 2026
For anyone still following this: ideaplexus/imaginary 2.3.0, a maintained fork of imaginary (Docker images for amd64 and arm64 as
ideaplexus/imaginary:2.3.0), answers with a JPEG if the encoder of WebP, AVIF, HEIF or JPEG XL fails on an image, instead of an error; see its FAQ.