Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
gatsby-source-gcs-image
Advanced tools
Readme
gatsby-source-gcs-image
is a GatsbyJS source plugin that converts images from Google Cloud Storage into GatsbyJS File
nodes--much like how this plugin works with AWS S3. See here for more.
The created GatsbyJS File
nodes can then be manipulated with image processors like sharp.
npm install --save-dev gatsby-source-gcs-image
or
yarn add -D gatsby-source-gcs-image
At a minimum GCP creds must be provided with either credsJson
or pathToCreds
. Some example configurations are:
// gatsby-config.js
module.exports = {
plugins: [
{
resolve: 'gatsby-source-gcs-image',
options: {
bucketName: 'my-gcs-bucket.appspot.com',
bucketPath: '/path/to/images',
expires: 120,
pathToCreds: `${__dirname}/.gcp-creds.json`,
projectId: 'my-gcp-project',
},
},
// ...image transform plugins
],
}
or
// gatsby-config.js
module.exports = {
plugins: [
{
resolve: 'gatsby-source-gcs-image',
options: {
credsJson: process.env.ENV_VAR_WITH_CREDS,
},
},
// ...image transform plugins
],
}
name | type | default | required | description |
---|---|---|---|---|
bucketName | string | * | GCS bucket (may exist in creds) | |
credsJson | string | * | JSON string with creds (optional if pathToCreds is provided) | |
expires | number | 900 | signed url expiration in seconds | |
pathToCreds | string | * | JSON file with creds (optional if credsJson is provided) | |
projectId | string | * | GCP project id (may exist in creds) |
export const pageQuery = graphql`
{
allGcsImage {
edges {
node {
name
childImageSharp {
gatsbyImageData(layout: CONSTRAINED, width: 800)
}
}
}
}
}
`
FAQs
GatsbyJS plugin to source images from Google Cloud Storage
We found that gatsby-source-gcs-image demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).