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

Background component doesn't utilize ImgixProvider's domain parameter #931

Closed
mtzo09-dev opened this issue Nov 22, 2023 · 3 comments · Fixed by #932
Closed

Background component doesn't utilize ImgixProvider's domain parameter #931

mtzo09-dev opened this issue Nov 22, 2023 · 3 comments · Fixed by #932
Assignees

Comments

@mtzo09-dev
Copy link

Describe the bug
In my Next.js application, I've wrapped my components using the ImgixProvider from the react-imgix library, specifying a domain for Imgix components. While all Imgix components correctly utilize this domain parameter, the Background component fails to do so.

To Reproduce

  • Wrap a Background component with the ImgixProvider.
  • Set the domain within the provider.
  • Provide a source for the background without including the domain.
  • Observe the error that occurs.
import { Background, ImgixProvider } from 'react-imgix'

 <ImgixProvider domain={IMGIX_DOMAIN}>
      <Imgix
        src="image.jpg"
        width={100}
      /> {/* The Imgix component successfully uses the domain from the Provider */}
      <Background src="image.png" className="blog-title">
        <h2>Blog Title</h2>
      </Background> {/* The Background component fails to utilize the domain from the Provider */}
 </ImgixProvider>

Expected behaviour
I expect the Background component to correctly utilize the domain specified in the ImgixProvider, ensuring consistent behavior across all Imgix components.

@mtzo09-dev mtzo09-dev changed the title The Background component is not taking the domain parameter from the the ImgixProvider Background component doesn't utilize ImgixProvider's domain parameter Nov 22, 2023
@longevitytina longevitytina self-assigned this Nov 29, 2023
@longevitytina
Copy link
Contributor

Hi @mtzo09-dev. We are looking into this, thank you for the thorough issue description.

@longevitytina
Copy link
Contributor

@mtzo09-dev we have released a rc tag if you want to try out the changes while we are testing.
You can update you react-imgix in package.json to 9.8.1-rc.2 or see this sandbox with the rc tag applied

@mtzo09-dev
Copy link
Author

Thank you, @longevitytina! I'll definitely test the changes with my team. Also, thank you for letting me know about the release candidate tag. We'll give it a try and provide feedback accordingly.

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

Successfully merging a pull request may close this issue.

2 participants