Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
gatsby-plugin-storyblok-image
Advanced tools
Adds gatsby-plugin-image to Gatsby & Storyblok as a content source.
gatsby-plugin-storyblok-image let you use gatsby-plugin-image with Storyblok service v2.
This is helpful when your images are dynamically in content.
Let you take advantage of optimizing any images inside dynamic content (run-time optimizing), gets out of build-time complex processing of download -> markup each source -> static query for each component.
Plugin write with Typescript. Options design to be gatsby-plugin-image liked.
npm i gatsby-plugin-storyblok-image
or
yarn add gatsby-plugin-storyblok-image
import { GatsbyImage } from 'gatsby-plugin-image'
import { getGatsbyImageProps } from 'gatsby-plugin-storyblok-image'
export default function Image({ image }) {
const gatsbyImageData = getGatsbyImageProps(image, {
// layout can be 'fixed' | 'constrained' | 'fullWidth'
// see more: https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-plugin-image/#layout
layout: 'fixed',
// Use width & height when layout is 'fixed' or 'constrained'
// No need when layout is 'fullWidth'
width: 900,
height: 900,
// Optional:
// quality: 100,
// outputPixelDensities: [1, 2, 3], // For fixed or constrained
// breakpoints [750, 1080, 1366, 1920], // For fullWidth or constrained
// backgroundColor: '#fff', // Just pass to gatsby-plugin-image image prop
/** Storyblok image service additional options: */
// `fitIn` set `true` to make the image like fixed object to "contain". Refer to https://www.storyblok.com/docs/image-service#fit-in
// fitIn: true, // Default false (act like "cover")
// fitInColor: '#fff', // Color to fill when fitIn true. Default is transparent. okay to add `#` prefix.
// smartCrop: true, // Default true
// fallback: true, // Set false to disable fallback image. Default true
// fallbackQuality: 70, // Default 70
})
return (
<GatsbyImage {...gatsbyImageData} />
)
}
This plugin is the alternate of gatsby-storyblok-image, which is inspired by Sanity's way of implementing gatsby-image outside of GraphQL in their gatsby-source-sanity plugin.
FAQs
Adds gatsby-plugin-image to Gatsby & Storyblok as a content source.
We found that gatsby-plugin-storyblok-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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.