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

Resize using only one property #43

Open
busybox11 opened this issue Jul 7, 2022 · 2 comments
Open

Resize using only one property #43

busybox11 opened this issue Jul 7, 2022 · 2 comments

Comments

@busybox11
Copy link

busybox11 commented Jul 7, 2022

Hi,
I'm trying to use this webpack module to resize images using a defined height.
Though all of these images don't have the same width and I'd like to keep the original aspect ratio.
I searched in the docs if that was possible but it seems not.
Giving a single property to the resize object (for example, width), errors out saying that the other one is undefined.
Maybe I am mistaken but if that's not the case, could it be possible to integrate an option like this?
Thanks in advance!

@mobiliabrus
Copy link

set 0 for auto.

resize: { width: 100, height: 0 }
resize: { width: 0, height: 100 }

@busybox11
Copy link
Author

Thank you!
This should definitely be added to the README.
Going to test this out soon, thanks for your help!

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

No branches or pull requests

2 participants