Skip to content

Add custom icon support for web links#3325

Open
Adcbda wants to merge 1 commit into
HeyPuter:mainfrom
Adcbda:feature/custom-web-link-icon
Open

Add custom icon support for web links#3325
Adcbda wants to merge 1 commit into
HeyPuter:mainfrom
Adcbda:feature/custom-web-link-icon

Conversation

@Adcbda

@Adcbda Adcbda commented Jun 30, 2026

Copy link
Copy Markdown

Summary

  • Add persistent custom icon support for .weblink files.
  • Add a Change Icon context menu action that uses Puter's built-in file picker.
  • Read selected icon files from Puter FS and store them as data URLs in the web link payload.
  • Preserve legacy web links by falling back to the default link icon and upgrading plain-URL web links when edited.

Details

Web link icons were previously hard-coded to link.svg in the item icon resolver. This change centralizes web link parsing and icon handling in src/gui/src/helpers/weblink.js, stores the selected icon in the .weblink JSON, and teaches item_icon to prefer that custom icon when rendering.

The icon picker accepts image files selected through Puter's file manager. Because files read from Puter FS may have a generic Blob MIME type, the helper normalizes data URLs using the selected file type, extension, and image byte signatures for PNG, JPEG, GIF, WebP, and SVG.

Validation

  • npm run build --workspace src/gui

The build passes with the existing webpack bundle size warnings.

Introduce the ability to change and display custom icons for .weblink files. Added a "Change Icon" context menu item that invokes the changeWeblinkIcon helper, and updated the icon rendering logic to use getWeblinkIcon instead of the default link icon. This allows users to personalize web link appearance in the file manager.
@CLAassistant

CLAassistant commented Jun 30, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Adcbda Adcbda marked this pull request as ready for review June 30, 2026 08:37
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.

2 participants