Support for Cockpit CMS
Can the URLs be manually constructed? Unpic needs the transformer to be a pure, synchronous function with no side effects, so it can't call APIs.
Can the URLs be manually constructed? Unpic needs the transformer to be a pure, synchronous function with no side effects, so it can't call APIs.
The URL can indeed be constructed. It works the same way as Directus, Shopify etc, by generating an image on the fly, based on the URL parameters (as shown in the picture).
Here's the parameters you'd use to get a 500x500 webp image:
https://example.com/api/assets/image/2fd457c3376537fb3d0001e2?w=500&h=500&mime=webp&re=1
More specifically: width = w height = h format = mime crop = m
You always have to add re=1 as a parameter in order to be redirected to the actual image.
OK, great. If anyone wants to contribute it they should do so against the new syntax branch which includes uopdated instrucitons on contributing them. It looks like a relatively simple one.