Skip to content

[Karakeep] Screenshots fail to display in list view due to URL encoding and WEBP format issues #24966

@GRomR1

Description

@GRomR1

Extension

https://www.raycast.com/luolei/karakeep

Raycast Version

1.104.3

OS Version

macOS 26.1

Description

I have encountered an issue where bookmark screenshots and asset images fail to render in the Bookmarks and Lists commands (specifically within the BookmarkItem preview).

After investigating the network requests and the codebase, I identified two root causes:

  1. Missing Authentication/Pre-fetch in List View: The BookmarkItem component was manually constructing the image URL string. Unlike the detail view, it was not using the getScreenshot utility
    function, which performs an authenticated "pre-fetch" request (hack) to authorize the session and cache the image for Raycast to display.
  2. WEBP Format Compatibility: The backend defaults to serving images in WEBP format. It appears that Raycast's Markdown renderer has trouble displaying these specific WEBP streams. Changing the
    Accept header to image/png resolves the rendering issue.
  3. URL Encoding: There were inconsistencies in how the url parameter was being encoded in the constructed query string.

I have locally fixed this by refactoring BookmarkItem to use the getScreenshot async function and ensuring encodeURIComponent is applied correctly to the asset path.

Steps To Reproduce

  1. Open the Karakeep extension.
  2. Run the Bookmarks or Lists command.
  3. Select a bookmark that has an associated screenshot or image asset.
  4. Observe the Markdown preview pane on the right side.

Current Behaviour

The preview pane displays a broken image icon or remains empty.
When inspecting the requests, the image URL generation logic in BookmarkItem does not perform the necessary authenticated handshake, and the URL encoding for the asset path is sometimes incorrect
(e.g., issues with how /api/assets/... is passed to the Next.js image optimizer).

Expected Behaviour

The screenshot or asset image should load and display correctly in the preview pane of the list view, matching the behavior of the detailed view. The extension should request a PNG format to ensure
compatibility and correctly handle the URL encoding for the backend image proxy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingextensionIssues related to one of the extensions in the Storeextension: karakeepIssues related to the karakeep extension

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions