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

Placeholder size #95

Closed
MDSilviu opened this issue Apr 6, 2019 · 1 comment
Closed

Placeholder size #95

MDSilviu opened this issue Apr 6, 2019 · 1 comment
Assignees

Comments

@MDSilviu
Copy link

MDSilviu commented Apr 6, 2019

The actual svg placeholder used it's causing problems, since the viewbox it's a square and makes the browser reserve a square for space and for images that have random sizes this doesn't play well. For example i have problem with parallax at the top of a page since they fire before the lazyload gets the image and they calculate their passion using the square placeholder.
From what i've seen in the code this could a be an easy fix and just pass to the placeholder the width and the height of the image and this way the browser will reserve the correct space for the image that will be loaded and the page won't jump around when the image with it's true height will be loaded and it's not a square

@remyperona remyperona self-assigned this Apr 13, 2019
@remyperona
Copy link
Contributor

Hi,

This was added in version 2.2 of the plugin, that we just released.

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