Auth Image
ngx-prompt-kit original — not part of ibelick/prompt-kit
pk-auth-image fetches an image via HttpClient (so your auth interceptor attaches the token), shows the blob as an object URL, and revokes it on change/destroy. Skeleton while loading; a fallback (project [error] content) on failure.
Examples
Loads via HttpClient
Here it fetches a same-origin asset. In your app, point [url] at a token-protected endpoint — the auth interceptor adds the header automatically.
<pk-auth-image
[url]="'/api/attachment/' + id"
alt="Attachment"
class="h-24 w-24 rounded-md"
>
<span error>Couldn't load</span>
</pk-auth-image>Installation
Add the auth-image component. Requires provideHttpClient().
ng generate ngx-prompt-kit:auth-image