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

_chris's avatar

Image hosting and delivery

Hi all,

I'm running a project which deals with a lot of images. Each page load delivers approx 16 large images. At the moment I am just storing them on the server and using thephpleague's Glide package to deliver them at different resolutions depending on the users screen. This is causing the cache to build up and storage space is getting full so I am looking for better solutions.

I guess a CDN would be a good place to store them, but I then wouldn't be able to use Glide to automatically bring back different sizes (I think).

Any suggestions welcomed.

0 likes
2 replies
martinbean's avatar

@_chris Why wouldn’t you be able to use a CDN? A CDN just cached things at URLs. So if you are using Glide then you can just put a CDN in front of your Glide endpoint, and the CDN will cache the different images.

Please or to participate in this conversation.