gatsby-plugin-storyblok-image
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -95,6 +95,9 @@ "use strict"; | ||
const currentHeight = Math.round(currentWidth / desiredAspectRatio); | ||
// Workaround for Storyblok has bug when crop with width larger than 4000 (eg: crop 5000 will get 4000) | ||
// Not to set crop when size is same to source | ||
const sameToSource = currentWidth === dimensions.width && currentHeight === dimensions.height; | ||
const url = (0, buildImageUrl_1.default)(originalPath, { | ||
...options, | ||
width: currentWidth === dimensions.width ? undefined : currentWidth, | ||
height: currentHeight === dimensions.height ? undefined : currentHeight | ||
width: sameToSource ? undefined : currentWidth, | ||
height: sameToSource ? undefined : currentHeight | ||
}); | ||
@@ -101,0 +104,0 @@ return `${url} ${resolution}`; |
{ | ||
"name": "gatsby-plugin-storyblok-image", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "Adds gatsby-plugin-image to Gatsby & Storyblok as a content source.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -5,3 +5,3 @@ # gatsby-plugin-storyblok-image | ||
[![Tested with Jest](https://img.shields.io/badge/tested_with-Jest-99424f.svg)](https://github.com/facebook/jest) | ||
[![Coverage Status](https://coveralls.io/repos/github/nonjene/gatsby-plugin-storyblok-image/badge.svg?branch=master)](https://coveralls.io/github/nonjene/gatsby-plugin-storyblok-image?branch=master) | ||
[![Coverage Status](https://coveralls.io/repos/github/nonjene/gatsby-plugin-storyblok-image/badge.svg)](https://coveralls.io/github/nonjene/gatsby-plugin-storyblok-imager) | ||
@@ -8,0 +8,0 @@ _gatsby-plugin-storyblok-image_ let you use [gatsby-plugin-image](https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-plugin-image) with [Storyblok service v2](https://www.storyblok.com/docs/image-service). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16930
309