I've been writing a web app for some time now, and I've been running into some issues with serving images.
My code pulls file data from the server, using
listen [port] http2
return $response->withHeader('Content-Type', mime_content_type($filepath))->write(file_get_contents($filepath));
I solved this using Guzzle's
LazyOpenStream class. Seems to work flawless now!
Edit: So, while this didn't initially appear to work, it turns out some file permissions were screwed up on
nginx's end since I changed the user---
nginx no longer owned its FastCGI cache directory. That's fortunately been fixed now, and everything seems to work.
Protip if you're in my situation: Read The Frackin' Logs!