Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Evanz's avatar
Level 1

How to return lumen api data with images.

I am using lumen as my api and attempting to return paginated user data with the respective user images that are uploaded to the server, but I have no idea how to implement this functionality. I am returning this data to my mobile app but I am unable to get the images.

0 likes
3 replies
martinbean's avatar
Level 80

@evanz Well you return the image URLs, and then the client renders the images at those URLs.

Evanz's avatar
Level 1

@martinbean The last time I tried to do that, It was not successful. And it looks like you can only access the public folder in lumen and laravel through the project itself.

martinbean's avatar

The last time I tried to do that, It was not successful.

Displaying an image via its URL? That’s literally how displaying any image on the web works. Each mobile OS will also have their own way of displaying an image at a given URL.

it looks like you can only access the public folder in lumen and laravel through the project itself.

@evanz Not true. It’s called public for a reason.

1 like

Please or to participate in this conversation.