@danielpetrica@infosec.exchange
Post #3622797
2026-06-25 01:00 UTC
One lesson from building the proxy: Storage::download() and streamDownload() buffer the entire file into memory. That gets expensive with large images. Switching to readStream() + response()->stream() sends the file directly from S3 to the client, no buffering. Small detail, big impact when you are serving media at scale.
#Laravel #PHP #programming
https://danielpetrica.com/how-to-replace-raw-s3-urls-with-a-laravel-image-proxy-and-keep-your-cdn-cache
Replies (0)
No replies.