-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
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:
- Missing Authentication/Pre-fetch in List View: The
BookmarkItemcomponent was manually constructing the image URL string. Unlike the detail view, it was not using thegetScreenshotutility
function, which performs an authenticated "pre-fetch" request (hack) to authorize the session and cache the image for Raycast to display. - 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
Acceptheader toimage/pngresolves the rendering issue. - URL Encoding: There were inconsistencies in how the
urlparameter 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
- Open the Karakeep extension.
- Run the Bookmarks or Lists command.
- Select a bookmark that has an associated screenshot or image asset.
- 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.