getFavicon
Icon showing the favicon of a website.
A favicon (favorite icon) is a tiny icon included along with a website, which is displayed in places like the browser's address bar, page tabs, and bookmarks menu.

Signature
function getFavicon(
url: string | URL,
options?: {
fallback?: Image.Fallback;
size?: boolean;
mask?: Image.Mask;
},
): Image.ImageLike;nameis a string of the subject's name.options.fallbackis a Image.Fallback icon in case the Favicon is not found. By default, the fallback will beIcon.Link.options.sizeis the size of the returned favicon. By default, it is 64 pixels.options.maskis the size of the Image.Mask to apply to the favicon.
Returns an Image.ImageLike that can be used where Raycast expects them.
Example
import { List } from "@raycast/api";
import { getFavicon } from "@raycast/utils";
export default function Command() {
return (
<List>
<List.Item icon={getFavicon("https://raycast.com")} title="Raycast Website" />
</List>
);
}Last updated

