# Logo API for Browser Extensions

> Simple image URL API that works perfectly in browser extensions. No API key needed, no CORS issues, no SDK to bundle — just an image URL.

## Integration Steps

1. **Use in HTML** — `<img src="https://img.loadlogo.com/{domain}">` works in extension popups and sidepanels.
2. **Extract tab domain** — Use `chrome.tabs` API to get the current tab's domain and display its logo.
3. **Size for extension UI** — Use `?size=16` for toolbar icons, `?size=32` for popups, `?size=64` for detail views.
4. **Batch rendering** — Map arrays of domains/bookmarks to logo URLs for grid displays.

## Benefits

- No API key required — works immediately
- No CORS issues — images load from any context
- No SDK to bundle — keeps extension size small
- Works in popups, sidepanels, content scripts, and options pages
- Sub-100ms delivery from edge CDN
- Monogram fallbacks for any domain

## Code Example

```javascript
// Get current tab's logo
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
  const url = new URL(tabs[0].url);
  const logo = `https://img.loadlogo.com/${url.hostname}?size=64`;
  document.getElementById("tab-logo").src = logo;
});

// Bookmark manager with logos
bookmarks.forEach(b => {
  const domain = new URL(b.url).hostname;
  b.logo = `https://img.loadlogo.com/${domain}?size=32`;
});
```

## Related Features

- [Domain Logo Lookup](/features/domain-lookup.md)
- [Global CDN Delivery](/features/cdn-delivery.md)
