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

ImageMedium methods don't update width/height parameters #1058

Open
fredrikekelund opened this issue Sep 22, 2016 · 3 comments
Open

ImageMedium methods don't update width/height parameters #1058

fredrikekelund opened this issue Sep 22, 2016 · 3 comments

Comments

@fredrikekelund
Copy link
Contributor

Would make sense if the width/height parameters were updated after the crop, resize etc. methods have been called.

@rhukster
Copy link
Member

Generally speaking it's not advisable to explicitly set width or height on an image in order to support responsiveness. There are also implications for high density displays.

@fredrikekelund
Copy link
Contributor Author

Maybe we misunderstand each other - I'm talking about the width and height parameters on the ImageMedium class. They're useful when calculating how to resize and crop images if I eg. want to render an image with an particular aspect ratio. Updating those parameters as the resize and crop related methods are called makes a lot of sense to help with calculations like that.

Whether or not theme authors use those parameters on <img> elements in the end is another question!

@rhukster
Copy link
Member

Ok miscommunication there :) that's not a bad idea then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants