gatsby-image
Advanced tools
Comparing version 1.0.29 to 1.0.30
63
index.js
@@ -110,7 +110,28 @@ "use strict"; | ||
var noscriptImg = function noscriptImg(props) { | ||
var _props$opacity = props.opacity, | ||
opacity = _props$opacity === undefined ? "" : _props$opacity, | ||
src = props.src, | ||
srcSet = props.srcSet, | ||
_props$sizes = props.sizes, | ||
sizes = _props$sizes === undefined ? "" : _props$sizes, | ||
_props$title = props.title, | ||
title = _props$title === undefined ? "" : _props$title, | ||
_props$alt = props.alt, | ||
alt = _props$alt === undefined ? "" : _props$alt, | ||
_props$width = props.width, | ||
width = _props$width === undefined ? "" : _props$width, | ||
_props$height = props.height, | ||
height = _props$height === undefined ? "" : _props$height, | ||
_props$transitionDela = props.transitionDelay, | ||
transitionDelay = _props$transitionDela === undefined ? "" : _props$transitionDela; | ||
return "<img width=" + width + " height=" + height + " src=\"" + src + "\" srcset=\"" + srcSet + "\" alt=\"" + alt + "\" title=\"" + title + "\" sizes=\"" + sizes + "\" style=\"position:absolute;top:0;left:0;transition:opacity 0.5s;transition-delay:" + transitionDelay + ";opacity:" + opacity + ";width:100%;height:100%;object-fit:cover;objectPosition:center\"/>"; | ||
}; | ||
var Img = function Img(props) { | ||
var opacity = props.opacity, | ||
onLoad = props.onLoad, | ||
_props$transitionDela = props.transitionDelay, | ||
transitionDelay = _props$transitionDela === undefined ? "" : _props$transitionDela, | ||
_props$transitionDela2 = props.transitionDelay, | ||
transitionDelay = _props$transitionDela2 === undefined ? "" : _props$transitionDela2, | ||
otherProps = (0, _objectWithoutProperties3.default)(props, ["opacity", "onLoad", "transitionDelay"]); | ||
@@ -288,13 +309,7 @@ | ||
}), | ||
_react2.default.createElement( | ||
"noscript", | ||
null, | ||
_react2.default.createElement(Img, { | ||
alt: alt, | ||
title: title, | ||
srcSet: image.srcSet, | ||
src: image.src, | ||
sizes: image.sizes | ||
}) | ||
) | ||
_react2.default.createElement("noscript", { | ||
dangerouslySetInnerHTML: { | ||
__html: noscriptImg((0, _extends3.default)({ alt: alt, title: title }, image)) | ||
} | ||
}) | ||
) | ||
@@ -380,14 +395,12 @@ ); | ||
}), | ||
_react2.default.createElement( | ||
"noscript", | ||
null, | ||
_react2.default.createElement(Img, { | ||
alt: alt, | ||
title: title, | ||
width: _image.width, | ||
height: _image.height, | ||
srcSet: _image.srcSet, | ||
src: _image.src | ||
}) | ||
) | ||
_react2.default.createElement("noscript", { | ||
dangerouslySetInnerHTML: { | ||
__html: noscriptImg((0, _extends3.default)({ | ||
alt: alt, | ||
title: title, | ||
width: _image.width, | ||
height: _image.height | ||
}, _image)) | ||
} | ||
}) | ||
) | ||
@@ -394,0 +407,0 @@ ); |
{ | ||
"name": "gatsby-image", | ||
"version": "1.0.29", | ||
"version": "1.0.30", | ||
"description": "Lazy-loading React image component with optional support for the blur-up effect.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -164,3 +164,3 @@ # gatsby-image | ||
_Please see the | ||
[gatsby-plugin-sharp](https://www.gatsbyjs.org/packages/gatsby-plugin-sharp/#tracedsvg) | ||
[gatsby-plugin-sharp](/packages/gatsby-plugin-sharp/#tracedsvg) | ||
documentation for more information on `tracedSVG` and its configuration | ||
@@ -167,0 +167,0 @@ options._ |
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
25013
376