File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change 11<template >
22 <UnLazyImage
33 :src
4- :sources
54 :src-set
65 :alt
76 :width
@@ -34,12 +33,13 @@ const props = withDefaults(defineProps<Props>(), {
3433const appConfig = useAppConfig ()
3534
3635const 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+ /*
5860interface ImageSource {
5961 type: string
6062 srcSet: string
6163 sizes?: string
6264}
63-
6465const 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
8078const style = computed <false | string >(() => {
8179 if (props .width !== undefined && props .height !== undefined ) {
You can’t perform that action at this time.
0 commit comments