feat: add kontent.ai CDN#19
Conversation
|
@ascorbic not sure if you get notified automatically, can't assign to you. |
…ux1/unpic into feature/add-kontentai
|
Hey. Is there a way of ensuring that the API uses a "cover" cover strategy when resizing? This isn't giving the expected aspect ratio: https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/cc0afdc7-23d7-4fde-be2c-f58ad54d2934/daylight.jpg?w=800&h=300 |
|
To run test tests locally you'll need the deno CLI installed, and then you can run |
|
Hey @ascorbic I ran the tests locally now, should be passing now. |
|
Great! It looks like that one distorts the image, but fit=crop does the job: https://assets-us-01.kc-usercontent.com/b744f382-bfc7-434d-93e7-a65d51249bc7/cc0afdc7-23d7-4fde-be2c-f58ad54d2934/daylight.jpg?w=800&h=300&fit=crop |
|
Ok, their docs weren’t really clear on this. Will adapt the logic. |
|
Yeah. I ended up just randomly trying values! |
|
Updated the code + tests |
Added Kontent.ai CDN support.
Not sure how to run the tests locally, so couldn't verify this.