Skip to content
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

#63: Adding ar shorthand for aspect and support for numeric values for aspect #74

Merged

Conversation

tony-sull
Copy link

Integrating feedback from polarathene's comment, better matching Cloudinary's support for aspect ratio

This adds ar as a shorthand for aspect in the resize transform, e.g. ar=16:9 is the same as aspect=16:9

This also adds support for numeric aspect values representing the width divided by height, e.g. aspect=1.5 is the same as aspect=3:2

Copy link
Owner

@JonasKruckenberg JonasKruckenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also add the ar property to the ResizeOptions interface, but the rest looks good 👍

packages/core/src/transforms/resize.ts Outdated Show resolved Hide resolved
packages/core/package.json Outdated Show resolved Hide resolved
@JonasKruckenberg JonasKruckenberg merged commit e96b7e3 into JonasKruckenberg:main Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants