#A way to do dynamic image srcsets?
9 messages · Page 1 of 1 (latest)
I'm thinking maybe that I just switch my approach and create an adapter for the cloud storage plugin to work with cloudinary or one of the other media storage products
what frontend are you using?
We do have a PR open that builds this feature
but there's some debate about how this could open up the Payload APIs to malicious requests - i.e. someone blasting your endpoint and asking for media to be resized in 100000 different sizes
but if you're using next / gatsby / etc, they provide dynamic srcset functionality for you, so you just need to store one image and then have your frontend take care of resizing
Unfortunately I'm using Astro. Slightly an aside but I did wonder about how the cloud storage plugin works. The frontend still receives a URL to the CMS but if I wanted to take advantage of a CDN I imagine that I'd have to make sure that the frontend receives the URL for the image stored on the CDN
I am planning to implement this, would appreciate any insider input regarding easy plugging into pl’s rate limiting mechanism. I’ll try to create a custom namespace behind /media, erroring on sizes exceeding original dimensions.
@unkempt nebula do you mind provide us with that PR?