asset-handling
Asset handling
What to re-host (upload via upload_asset)
- Logo / brand mark
- Hero image (at most one per page)
- Founder/team photos
- Product screenshots
- Background textures that aren't generic
What to skip
- Stock photos from unsplash/shutterstock/etc. — they don't belong to the source site
- Tracking pixels, analytics beacons
- Third-party widgets (Stripe.js, Intercom, etc.) — never upload
- Favicons (the platform auto-generates these)
- Images behind authentication
Hotlinking rules
- Never hotlink to the source's CDN — they may break or be CC-protected
- Never hotlink to third parties (you don't control their ToS)
- Always use the
relative_urlreturned byupload_assetfor<img src>etc.
Logo detection
Inspect the source HTML for image URLs. The logo usually appears as:
<img>inside<nav>or top-left of header<a class="navbar-brand">- An SVG with id containing
logo,brand,wordmark
Pick the highest-resolution raster or the SVG (prefer SVG).
Cost awareness
Each upload costs ~50KB-2MB of storage. The platform enforces storage limits.
Prioritize: logo + 1-3 hero images. Everything else should be either dropped
or replaced with a daisyUI-native element (e.g., use btn, not a button
background image).
Replacing an existing asset
If the source site already has a logo on the rebuilt PageWeave site and you
want to refresh it (e.g., higher-res version, updated branding), pass the
existing asset's asset_id to upload_asset instead of creating a new
asset. The URL and filename are preserved; only the bytes change. The
content_type must match the original. Use list_assets to find the
asset_id of the asset to replace.