Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-plugin-storyblok-image

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-storyblok-image - npm Package Compare versions

Comparing version 2.0.10 to 2.0.11

2

dist/getGatsbyImage.js

@@ -110,3 +110,3 @@ "use strict";

sources: [],
fallback: options.fallback === false ? null : (0, buildImageUrl_1.buildLowFiUrl)(originalPath, { width, height })
fallback: options.fallback === false ? null : (0, buildImageUrl_1.buildLowFiUrl)(originalPath, options)
},

@@ -113,0 +113,0 @@ backgroundColor: options.backgroundColor || 'transparent',

@@ -5,3 +5,3 @@ import { MergedGetGatsbyImageOptions } from '../typings/module';

export default function buildImageUrl(originalPath: string, image: Image): string;
export declare function buildLowFiUrl(originalPath: string, opt?: Pick<Image, 'fitIn' | 'height' | 'width'>): string;
export declare function buildLowFiUrl(originalPath: string, opt?: Image): string;
export {};

@@ -43,7 +43,7 @@ "use strict";

exports.default = buildImageUrl;
function buildLowFiUrl(originalPath, opt) {
function buildLowFiUrl(originalPath, opt = {}) {
const width = 20;
let height = undefined;
// Compat case when croping with different aspect ratio
if ((opt === null || opt === void 0 ? void 0 : opt.height) && (opt === null || opt === void 0 ? void 0 : opt.width)) {
if (opt.height && opt.width) {
height = (opt.height / opt.width) * width;

@@ -55,5 +55,5 @@ }

quality: 10,
fitIn: opt === null || opt === void 0 ? void 0 : opt.fitIn
fitIn: opt.fitIn
});
}
exports.buildLowFiUrl = buildLowFiUrl;
{
"name": "gatsby-plugin-storyblok-image",
"version": "2.0.10",
"version": "2.0.11",
"description": "Adds gatsby-plugin-image to Gatsby & Storyblok as a content source.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc