-
Notifications
You must be signed in to change notification settings - Fork 116
allow string props for image width/height #8
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
Conversation
Thanks @Roilan! I've not heard of |
You have a good point. I don't think I've seen people do it outside of using CSS for |
I think that sounds like the way to go, though there is this caveat to using images without sizes in the markup: https://www.campaignmonitor.com/blog/email-marketing/2007/06/always-include-the-width-and-h/ |
Hmmm. You have a good point. I'm not entirely sure what the right decision is here. While |
It seems like a good idea to include a starting width/height even if the image is going to be scaled, and progressively enhance via CSS if it's supported. Overriding the |
Out of the options we have mentioned, I think that's the best thing to do. We should also add a note in the documentation mentioning this. Wouldn't want someone spending a great amount of time trying to debug this. I'm good to make the adjustments if you're on board. |
That sounds great, thank you! |
Closing see #9 |
Allows Image height / width a string prop because
auto
is a common use case to maintain aspect ratio.