Closed Mohammad-Khazaee closed 2 years ago
seems there is a solution in sharp node js https://stackoverflow.com/questions/65740056/how-to-send-the-resized-image-from-sharp-back-to-user
Hi @Mohammad-Khazaee,
You can use writeToBuffer
to write to a string, for example (untested):
$data = $image->writeToBuffer(".jpg");
echo "Content-length: {strlen($data)}";
echo "Content-type: image/jpeg";
echo "";
echo $data;
thanks for quick response
Hi i created a laravel app for image api like this https://imgix.com
but here is a problem i wanna response the file without saving it in my for example: my current laravel app
instead i wanna do :
this is a serious problem for me and my app because of performance stuff is there any way to do that or similar things?