-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Thanks for this.
Added Kontent.ai CDN support.
Not sure how to run the tests locally, so couldn't verify this.