{"record":{"id":"d17988a45fc2f016","repo":"windmill-labs/windmill","slug":"invalid-image-object-typeof-resolvedconfig-source","errorCode":null,"errorMessage":"Invalid image object${typeof resolvedConfig.source}","messagePattern":"Invalid image object(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/apps/components/display/AppImage.svelte","lineNumber":63,"sourceCode":"\tlet imageUrl: string | undefined = $state(undefined)\n\n\tlet token = getContext<{ token?: string }>('AuthToken')\n\n\tasync function loadImage() {\n\t\tif (isPartialS3Object(resolvedConfig.source)) {\n\t\t\timageUrl = await getS3File({\n\t\t\t\tsource: resolvedConfig.source.s3,\n\t\t\t\tstorage: resolvedConfig.source.storage,\n\t\t\t\tpresigned: resolvedConfig.source.presigned,\n\t\t\t\tappPath: $appPath,\n\t\t\t\tusername: $userStore?.username,\n\t\t\t\tworkspace,\n\t\t\t\ttoken: token?.token,\n\t\t\t\tisEditor,\n\t\t\t\tconfiguration\n\t\t\t})\n\t\t} else if (resolvedConfig.source && typeof resolvedConfig.source !== 'string') {\n\t\t\tthrow new Error('Invalid image object' + typeof resolvedConfig.source)\n\t\t} else if (\n\t\t\tresolvedConfig.sourceKind === 's3 (workspace storage)' ||\n\t\t\tresolvedConfig.source?.startsWith('s3://')\n\t\t) {\n\t\t\timageUrl = await getS3File({\n\t\t\t\tsource: resolvedConfig.source?.replace('s3://', ''),\n\t\t\t\tappPath: $appPath,\n\t\t\t\tusername: $userStore?.username,\n\t\t\t\tworkspace,\n\t\t\t\ttoken: token?.token,\n\t\t\t\tisEditor,\n\t\t\t\tconfiguration\n\t\t\t})\n\t\t} else if (resolvedConfig.sourceKind === 'png encoded as base64') {\n\t\t\timageUrl = 'data:image/png;base64,' + resolvedConfig.source\n\t\t} else if (resolvedConfig.sourceKind === 'jpeg encoded as base64') {\n\t\t\timageUrl = 'data:image/jpeg;base64,' + resolvedConfig.source\n\t\t} else if (resolvedConfig.sourceKind === 'svg encoded as base64') {","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/apps/components/display/AppImage.svelte#L45-L81","documentation":"AppImage.svelte's loadImage() resolves the image component's configuration source. After trying configured resource/URL resolution, it accepts only a string source; if resolvedConfig.source is truthy but not a string (e.g. an object), it throws 'Invalid image object<type>' to signal a malformed app component configuration.","triggerScenarios":"A windmill app image component whose 'source' configuration field (possibly template-resolved via configuration) evaluates to an object or array instead of a URL string.","commonSituations":"Binding the image source to a step output that returns an object (e.g. {url: ...}) instead of a string; forgetting to append .url/.path on a JSON result; a misconfigured resource template resolving to structured data.","solutions":["Inspect the component's source config in the app editor and make it resolve to a string (e.g. append .url or .path to the bound step output)","If the value comes from a variable/step output, stringify the URL at the producing step","Use the resource-based branch (configured resource or s3:// string) instead of passing a raw object"],"exampleFix":"// before\nsource: `${inputs1.result}` // resolves to an object\n// after\nsource: `${inputs1.result.url}`","handlingStrategy":"validation","validationCode":"const src = resolvedConfig.source\nif (src && typeof src !== 'string') {\n  throw new TypeError(`Image source must be a string URL, got ${typeof src}`)\n}","typeGuard":"function isStringSource(s: unknown): s is string {\n  return typeof s === 'string'\n}","tryCatchPattern":"try {\n  await loadImage()\n} catch (e) {\n  if (e.message.startsWith('Invalid image object')) {\n    console.error('Fix image component source: it resolved to a non-string', e)\n  } else throw e\n}","preventionTips":["Bind the image source to a string field (.url/.path), never a whole object result","Preview the component with sample data to catch non-string resolutions early","Use resources or s3:// strings for stored images"],"tags":["windmill-apps","configuration","type-mismatch"],"backgroundTag":"invalid-component-config-type","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}