-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(gatsby-plugin-image): GatsbyImage not displaying image in IE11 #33416
fix(gatsby-plugin-image): GatsbyImage not displaying image in IE11 #33416
Conversation
Great work, @raresportan. I saw that the tests were failing even before your work. I initially thought that this PR is not ready for review because the checks were failing. |
Sadly the tests fail even on master branch. It would be great to make them pass yes. |
…ix/gatsby-plugin-image/ie11
@LekoArts, when you have a moment, can you please help with reviewing this PR? @raresportan has done a great job with it. Thank you! 🍻 |
Thank you for waiting, tested it thoroughly, and works like a charm! |
…33416) (#33806) (cherry picked from commit d708d91) Co-authored-by: Rares Portan <[email protected]>
Description
Picture element should not have position relative since there is another container,
gatsby-image-wrapper
that contains the image.The fix is applied only for picture elements with class
object-fit-polyfill
, which is added byobjectFitPolyfill
only for browsers that don't support theobject-fit
CSS property (e.g. IE11). The evergreen browsers are not affected by this fix.Sadly I had to use !important because the position relative is added by
objectFitPolyfill
as inline style.Related Issues
Fixes #30053
@wardpeet I see #30053 is assigned to you for a while, hopefully this helps.