{"record":{"id":"cc1f374cd50b5834","repo":"different-ai/openwork","slug":"use-a-wordmark-at-least-128-32-pixels","errorCode":null,"errorMessage":"Use a wordmark at least 128×32 pixels.","messagePattern":"Use a wordmark at least 128×32 pixels\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"ee/apps/den-web/app/(den)/dashboard/_components/brand-appearance-screen.tsx","lineNumber":50,"sourceCode":"  if (file.type !== \"image/png\" && file.type !== \"image/jpeg\") throw new Error(\"Use a PNG or JPEG image.\");\n  if (file.size > BRAND_ASSET_MAX_BYTES) throw new Error(\"Use an image under 2 MB.\");\n\n  let image: ImageBitmap;\n  try {\n    image = await createImageBitmap(file);\n  } catch {\n    throw new Error(\"OpenWork could not decode that image.\");\n  }\n\n  const { width, height } = image;\n  image.close();\n  if (width > 4096 || height > 4096) throw new Error(\"Use an image no larger than 4096×4096 pixels.\");\n  if (kind === \"icon\") {\n    if (width < 64 || height < 64) throw new Error(\"Use a square icon at least 64×64 pixels.\");\n    if (width !== height) throw new Error(\"Use a square image for the app icon.\");\n  } else {\n    const aspectRatio = width / height;\n    if (width < 128 || height < 32) throw new Error(\"Use a wordmark at least 128×32 pixels.\");\n    if (aspectRatio < 1.5 || aspectRatio > 8) throw new Error(\"Use a horizontal wordmark between 1.5:1 and 8:1.\");\n  }\n\n  return { file, previewUrl: URL.createObjectURL(file), width, height };\n}\n\nfunction BrandAssetUploadField({\n  kind,\n  title,\n  description,\n  currentUrl,\n  managedAsset,\n  draft,\n  clearPending,\n  disabled,\n  onSelect,\n  onClear,\n}: {","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-web/app/(den)/dashboard/_components/brand-appearance-screen.tsx#L32-L68","documentation":"For kind === \"wordmark\", the decoded image must be at least 128 pixels wide and 32 pixels tall; anything smaller is rejected because the wordmark would be illegible when rendered in the dashboard header and marketplace listings.","triggerScenarios":"Uploading a wordmark where width < 128 or height < 32 — e.g. a tiny 100×20 text banner, a scaled-down logo strip, or a 64×16 thumbnail.","commonSituations":"Screenshots of tiny logo text; exporting a thin text layer at 1x from a small frame; reusing a footer stamp or email signature image.","solutions":["Re-export the wordmark at e.g. 512×128 PNG so it comfortably clears the 128×32 minimum.","Render the text/logo at a larger point size in the design tool before export.","Keep the aspect ratio between 1.5:1 and 8:1 (the next check) — a 512×128 export satisfies both.","Pre-check dimensions client-side before invoking the draft creator."],"exampleFix":"// before\nawait draft(smallStamp /* 100x20 */, \"wordmark\");\n// after\nawait draft(wordmarkPng /* 512x128 */, \"wordmark\");","handlingStrategy":"validation","validationCode":"async function isWordmarkBigEnough(file: File): Promise<boolean> {\n  const bmp = await createImageBitmap(file);\n  const ok = bmp.width >= 128 && bmp.height >= 32;\n  bmp.close();\n  return ok;\n}","typeGuard":null,"tryCatchPattern":"try {\n  const asset = await createBrandAssetDraft(file, \"wordmark\");\n} catch (error) {\n  showToast(error instanceof Error ? error.message : \"Could not use that image.\");\n}","preventionTips":["Export wordmarks at ≥512×128 so both the minimum-size and 1.5:1–8:1 ratio checks pass","Do not use email-signature or footer stamps as wordmarks","Set a design-tool export preset for the wordmark asset","Show minimum dimensions in the upload UI copy"],"tags":["image-validation","dimensions","wordmark"],"backgroundTag":"invalid-image-dimensions","analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}