@webstudio-is/image 0.2.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -93,7 +93,7 @@ const getImageAttributes = (props) => {
|
|
|
93
93
|
Math.min(getInt(props.quality) ?? DEFAULT_QUALITY, 100),
|
|
94
94
|
0
|
|
95
95
|
);
|
|
96
|
-
if (props.src != null && props.src
|
|
96
|
+
if (props.src != null && props.src !== "") {
|
|
97
97
|
if (props.srcSet == null && props.optimize) {
|
|
98
98
|
const sizes = props.sizes ?? (props.width == null ? DEFAULT_SIZES : void 0);
|
|
99
99
|
return generateImgAttrs({
|
package/lib/image-optimize.js
CHANGED
|
@@ -69,7 +69,7 @@ const getImageAttributes = (props) => {
|
|
|
69
69
|
Math.min(getInt(props.quality) ?? DEFAULT_QUALITY, 100),
|
|
70
70
|
0
|
|
71
71
|
);
|
|
72
|
-
if (props.src != null && props.src
|
|
72
|
+
if (props.src != null && props.src !== "") {
|
|
73
73
|
if (props.srcSet == null && props.optimize) {
|
|
74
74
|
const sizes = props.sizes ?? (props.width == null ? DEFAULT_SIZES : void 0);
|
|
75
75
|
return generateImgAttrs({
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { Image as ImagePrimitive, loaders } from "./";
|
|
|
7
7
|
// to not allow include local assets everywhere, just enable it for this file
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
9
9
|
// @ts-ignore
|
|
10
|
-
import localLogoImage from "../storybook-assets/logo.webp";
|
|
10
|
+
import localLogoImage from "../storybook-assets/logo.webp"; // eslint-disable-line
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
13
|
title: "Components/ImageDev",
|
package/src/image-optimize.ts
CHANGED
|
@@ -225,7 +225,7 @@ export const getImageAttributes = (props: {
|
|
|
225
225
|
0
|
|
226
226
|
);
|
|
227
227
|
|
|
228
|
-
if (props.src != null && props.src
|
|
228
|
+
if (props.src != null && props.src !== "") {
|
|
229
229
|
if (props.srcSet == null && props.optimize) {
|
|
230
230
|
const sizes =
|
|
231
231
|
props.sizes ?? (props.width == null ? DEFAULT_SIZES : undefined);
|