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

fix(gatsby-plugin-image): Use bare GATSBY___IMAGE global #30713

Merged
merged 5 commits into from
Apr 7, 2021

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Apr 6, 2021

The image plugin currently defines global.GATSBY___IMAGE to detect when the plugin is installed, which causes problems with thrid-party plugins. This changes it to just create a bare global GATSBY___IMAGE, and updates types to match.

Thanks @kelvindecosta for his PR, but there were some issues in the approach there so I have opened this instead.

Fixes #30093, fixes #30094, fixes #30456, fixes #30609

@kelvindecosta
Copy link
Contributor

Thank you for the feedback!

I'll admit that my fix was rather crude, and I'm glad that this PR solves the underlying issue!

Thanks again!

pieh
pieh previously approved these changes Apr 7, 2021
Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, thanks!

@LekoArts LekoArts added the topic: media Related to gatsby-plugin-image, or general image/media processing topics label Apr 7, 2021
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮

@ascorbic ascorbic added this to To cherry-pick in V3 Release Hotfixes via automation Apr 7, 2021
@ascorbic ascorbic merged commit a5869e3 into master Apr 7, 2021
@ascorbic ascorbic deleted the fix/gatsby-image-global branch April 7, 2021 10:39
LekoArts pushed a commit that referenced this pull request Apr 7, 2021
* fix(gatsby-plugin-image): Use bare GATSBY___IMAGE global

* Fix check

* Fix test

* Use helper

* Remove unused type

(cherry picked from commit a5869e3)
@LekoArts LekoArts moved this from To cherry-pick to Backport PR opened in V3 Release Hotfixes Apr 7, 2021
LekoArts pushed a commit that referenced this pull request Apr 7, 2021
…0734)

* fix(gatsby-plugin-image): Use bare GATSBY___IMAGE global

* Fix check

* Fix test

* Use helper

* Remove unused type

(cherry picked from commit a5869e3)

Co-authored-by: Matt Kane <matt@gatsbyjs.com>
@LekoArts
Copy link
Contributor

LekoArts commented Apr 7, 2021

Published in gatsby-plugin-image@1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: media Related to gatsby-plugin-image, or general image/media processing topics
Projects
No open projects
4 participants