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

Object_fit does not work #24

Open
erol0020 opened this issue Apr 10, 2017 · 3 comments
Open

Object_fit does not work #24

erol0020 opened this issue Apr 10, 2017 · 3 comments

Comments

@erol0020
Copy link

Hi Kashmir.

First of all, let me say that this plugin is really nice and easy to use. Thumbs up for that!
However, There is a small problem I am encountering. I have gif's on my website and I do want this plugin to stop them to save memory.
By default, I have styled them to use a fixed dimension (width = 450px, height 300px and object_fit: contain) to maintain their aspect ratio. When gifffer is activated and the canvas is used, the image is stretched. Looks like object_fit has not applied to it. Is there a way to fix this?

Best regards Erol

@krasimir
Copy link
Owner

Hello, sorry for the late reply. It is possible due to how Gifffer works. It replaces your original image with another one and I'm not sure how the browser applies object-fit in this case.

@erol0020
Copy link
Author

Hi Krasimir.

Thank you for your reply and sorry for my late reply.
Do you have any recommendation what I can do with the situation?

@krasimir
Copy link
Owner

I guess you should keep the aspect ration by yourself. I mean setting explicit numbers.

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

2 participants