@paris-ias/list 1.1.8 → 1.1.9
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/dist/module.json
CHANGED
|
@@ -18,19 +18,23 @@
|
|
|
18
18
|
:aspect-ratio="ratio"
|
|
19
19
|
:class="{ 'img-animation': animate }"
|
|
20
20
|
:lazy-src="
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
isLocalAsset
|
|
22
|
+
? computedSrc
|
|
23
|
+
: img(computedSrc, {
|
|
24
|
+
width,
|
|
25
|
+
quality: 70,
|
|
26
|
+
})
|
|
25
27
|
"
|
|
26
28
|
:src="
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
isLocalAsset
|
|
30
|
+
? computedSrc
|
|
31
|
+
: img(computedSrc, {
|
|
32
|
+
width,
|
|
33
|
+
quality: 70,
|
|
34
|
+
})
|
|
31
35
|
"
|
|
32
|
-
:srcset="_srcset.srcset"
|
|
33
|
-
:sizes="_srcset.sizes"
|
|
36
|
+
:srcset="isLocalAsset ? undefined : _srcset.srcset"
|
|
37
|
+
:sizes="isLocalAsset ? undefined : _srcset.sizes"
|
|
34
38
|
:title="caption"
|
|
35
39
|
v-bind="$attrs"
|
|
36
40
|
>
|
|
@@ -49,6 +53,12 @@ const computedSrc = computed(() => {
|
|
|
49
53
|
if (!props.src) return null
|
|
50
54
|
return typeof props.src === "string" ? props.src : props.src?.url || null
|
|
51
55
|
})
|
|
56
|
+
|
|
57
|
+
// Root-relative paths (e.g. /default.png) are static public assets shipped
|
|
58
|
+
// with the site. The static deploy (nuxt generate → S3) has no live IPX server
|
|
59
|
+
// and only pre-generates /_ipx/ variants for images crawled during prerender,
|
|
60
|
+
// which the conditional fallback isn't — so route those raw and skip IPX.
|
|
61
|
+
const isLocalAsset = computed(() => computedSrc.value?.startsWith("/") ?? false)
|
|
52
62
|
const props = defineProps({
|
|
53
63
|
src: {
|
|
54
64
|
type: [Object, String],
|