Skip to content

Fix: Show placeholder icon when item has no thumbnail#44

Open
hyldmh wants to merge 1 commit into
Mossop:mainfrom
hyldmh:fix/43-broken-image-1779092173
Open

Fix: Show placeholder icon when item has no thumbnail#44
hyldmh wants to merge 1 commit into
Mossop:mainfrom
hyldmh:fix/43-broken-image-1779092173

Conversation

@hyldmh
Copy link
Copy Markdown

@hyldmh hyldmh commented May 18, 2026

Fix: Shows with no thumbnail appear as broken images

Closes #43

Problem: When an item has no thumbnail, the code returned an empty <View style={style} /> — a transparent, invisible box. Users see this as a "broken image".

Fix: When uri is undefined (no thumbnail stored), render a broken-image MaterialIcons placeholder instead of an empty View.

// Before
if (!uri) {
  return <View style={style} />;
}

// After
if (!uri) {
  return (
    <View style={style}>
      <MaterialIcons name="broken-image" size={Math.min(style.width, style.height) * 0.5} color="#999999" />
    </View>
  );
}

When an item has no thumbnail, the previous code returned an empty View — invisible with a transparent background. Now it shows a MaterialIcons broken-image placeholder icon.
Copy link
Copy Markdown
Owner

@Mossop Mossop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks but this makes a change to the wrong package. packages/cli/resources/thumbnail.js is probably where the issue is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shows with no thumbnail appear as broken images

2 participants