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

Image widths modified by object-fit don’t get detected correctly #57

Open
ausi opened this issue Jul 13, 2021 · 0 comments
Open

Image widths modified by object-fit don’t get detected correctly #57

ausi opened this issue Jul 13, 2021 · 0 comments
Labels

Comments

@ausi
Copy link
Owner

ausi commented Jul 13, 2021

Any value for the CSS property object-fit other than fill can result in an image width that differs from img.clientWidth in

return img.clientWidth

This property should be taken into account.

Sadly, there seems to be no JavaScript API for accessing the actual display image size inside the <img> if object-fit is used.

@ausi ausi added the bug label Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant