Skip to content

Commit 2d70b45

Browse files
committed
Reapply "fix(images): disable sources, since they are broken atm"
This reverts commit 8f3d8bb.
1 parent 98e5a76 commit 2d70b45

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

components/AttributeResponsiveImage.vue

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<template>
22
<UnLazyImage
33
:src
4-
:sources
54
:src-set
65
:alt
76
:width
@@ -34,12 +33,13 @@ const props = withDefaults(defineProps<Props>(), {
3433
const appConfig = useAppConfig()
3534
3635
const srcSet = computed<string | undefined>(() => {
37-
if (props.sizes) {
38-
const format = appConfig.attributeContent.images.formats.at(-1)
39-
if (format !== undefined) {
40-
return getSrcSet(format)
41-
}
36+
// @todo: see todo below regarding sources.
37+
// if (props.sizes) {
38+
const format = appConfig.attributeContent.images.formats.at(-1)
39+
if (format !== undefined) {
40+
return getSrcSet(format)
4241
}
42+
// }
4343
return undefined
4444
})
4545
@@ -55,27 +55,25 @@ const getSrcSet = (imageFormat: ImageFormat): string => {
5555
}).srcset
5656
}
5757
58+
// @todo: using sources currently broken. too large images are being fetched
59+
/*
5860
interface ImageSource {
5961
type: string
6062
srcSet: string
6163
sizes?: string
6264
}
63-
6465
const sources = computed<ImageSource[] | undefined>(() => {
6566
if (props.sizes) {
6667
return undefined
6768
}
6869
return appConfig.attributeContent.images.formats.map((imageFormat) => {
69-
const source: ImageSource = {
70+
return {
7071
type: `image/${imageFormat.format}`,
7172
srcSet: getSrcSet(imageFormat),
7273
}
73-
if (props.sizes) {
74-
source.sizes = props.sizes
75-
}
76-
return source
7774
})
7875
})
76+
*/
7977
8078
const style = computed<false | string>(() => {
8179
if (props.width !== undefined && props.height !== undefined) {

0 commit comments

Comments
 (0)