Replies: 1 comment
-
Hello @benconda, yes, it should be easy, though I'm a bit vague about exactly how to do this in php, I'm sure you know better than me. There's a streaming example here: https://github.com/libvips/php-vips/blob/master/examples/streaming-custom.php That uses I think all you need to do is use https://www.php.net/manual/en/streamwrapper.stream-write.php And you should be able to write the bytes directly to the user. You can also do things like read and write images directly to and from API endpoints like S3 with no buffering, which can be handy. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm using libvips to generate an image, then returning the image through an API. It's a 2 step mechanism that write to a temporary file and then return the file content to the Response body.
I wonder if I can stream the image to the API response body directly, like a streaming feature?
I see some related thing with custom Targets, have you an already existing example on how to achieve this ?
Thank you 🙏
Beta Was this translation helpful? Give feedback.
All reactions