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

Why not use width and height attributes to calculate data-aspectratio if available? #642

Closed
Hlsgs opened this issue Apr 23, 2019 · 3 comments

Comments

@Hlsgs
Copy link

Hlsgs commented Apr 23, 2019

Just a quick a hopefully not dumb question ^ :)

I'm having to do extra queries in Wordpress to get the image size so as to add the "data-aspectratio" attribute while cusmomizing the "sizes" attributes(I only use sizes="auto" when necessary), when WP already always provides the width and height attributes. This in in conjunction with object-fit and your parent fit plugin.

aFarkas added a commit that referenced this issue Apr 23, 2019
@aFarkas
Copy link
Owner

aFarkas commented Apr 23, 2019

Thank you

@aFarkas aFarkas closed this as completed Apr 23, 2019
@thasmo
Copy link

thasmo commented May 13, 2019

This is the best feature ever. ❤️

@thasmo
Copy link

thasmo commented May 13, 2019

Oh, I just realized - is there a reason this has not been implemented in plugins/aspectratio?

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

3 participants