-
Notifications
You must be signed in to change notification settings - Fork 842
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
[EuiImage] Using allowFullScreen
on an image with a data URI source doesn't respect sizing
#4055
Comments
Isn't it supposed to receive url prop instead of src? |
Depends on if you are linking to an outside source or local resource you're displaying inline. |
Hi @cchaos, I started working on this issue and after "fixing" it, I realized that the issue is not because the image has a data URI when The problem is that the image in the example is very small. Here's an example with another small image without a data URI: I also left two example with large images and one of them with a data URI. Both examples, work well. For small images, we could actually force the image to grow in width. If the image with data URI is an SVG it makes sense because it will keep a good quality. But what if it is not? In my opinion, consumers should provide images with large sizes if they want to open in full screen. But if you think this is something we should have I can open a PR that:
Should I open the PR? |
Thanks for investigating further! Yeah, my feeling is that adding the I'm trying to think of situations where bullet 2 (forced enlarging in full screen mode) makes sense. It's certainly helpful with SVG's as you mentioned since they can scale without loss of quality. But does that then misrepresent the actual size of the image and I don't think we want to scale indefinitely even for images that were proportioned correctly when not in full screen mode. I think more often than not, the image will be a raster image, so I'd opt for not scaling in full screen mode. So let's just tackle bullet one to ensure that |
When investigating #833 with this CSbox: https://codesandbox.io/s/v5rr7
I found that using
allowFullScreen
in conjunction with any explicitsize
prop gets ignored when supplying the source as a data-uri.The text was updated successfully, but these errors were encountered: