Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
gatsby-dynamic-image
Advanced tools
A React component that given a Gatsby File
node will either
render a gatsby-image component or a native img
element. This is useful
for cases where you don't know whether or not an image has been processed by
gatsby-transformer-sharp (such as when iterating over a collection which
contains references to images of varying formats).
npm install --save gatsby-dynamic-image
import Image from 'gatsby-dynamic-image';
import React from 'react';
export default ({ data }) => (
<React.Fragment>
<h1>My images</h1>
{data.allMarkdownRemark.edges.map(node => (
<Image node={node.frontmatter.image} />
))}
<Image node={data} />
</React.Fragment>
);
export const query = graphql`
query {
allMarkdownRemark {
edges {
node {
frontmatter {
image {
publicURL
childImageSharp {
fluid(maxWidth: 980) {
...GatsbyImageSharpFluid
}
}
}
}
}
}
}
}
`;
FAQs
A React component wrapping gatsby-image
We found that gatsby-dynamic-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.