@webstudio-is/image 0.128.0 → 0.130.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.
- package/lib/index.js +5 -0
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -163,6 +163,11 @@ var createImageLoader = (loaderOptions) => (props) => {
|
|
|
163
163
|
const width = props.format === "raw" ? 16 : props.width;
|
|
164
164
|
const quality = props.format === "raw" ? 100 : props.quality;
|
|
165
165
|
const { format, src } = props;
|
|
166
|
+
try {
|
|
167
|
+
new URL(src);
|
|
168
|
+
return src;
|
|
169
|
+
} catch {
|
|
170
|
+
}
|
|
166
171
|
if (true) {
|
|
167
172
|
warnOnce(
|
|
168
173
|
allSizes.includes(width) === false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webstudio-is/image",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.130.0",
|
|
4
4
|
"description": "Image optimization",
|
|
5
5
|
"author": "Webstudio <github@webstudio.is>",
|
|
6
6
|
"homepage": "https://webstudio.is",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"react": "^18.2.0",
|
|
17
17
|
"react-dom": "^18.2.0",
|
|
18
18
|
"typescript": "5.2.2",
|
|
19
|
-
"@webstudio-is/jest-config": "1.0.7",
|
|
20
19
|
"@webstudio-is/storybook-config": "0.0.0",
|
|
20
|
+
"@webstudio-is/jest-config": "1.0.7",
|
|
21
21
|
"@webstudio-is/tsconfig": "1.0.7"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|