title: "AssetPreviewPipe" weight: 10 showtoc: true
import MemberInfo from '@site/src/components/MemberInfo'; import GenerationInfo from '@site/src/components/GenerationInfo'; import MemberDescription from '@site/src/components/MemberDescription';
Given an Asset object (an object with preview and optionally focalPoint properties), this pipe
returns a string with query parameters designed to work with the image resize capabilities of the
AssetServerPlugin.
Example
<img [src]="asset | assetPreview:'tiny'" />
<img [src]="asset | assetPreview:150" />
class AssetPreviewPipe implements PipeTransform {
transform(asset?: AssetFragment, preset: string | number = 'thumb') => string;
}
PipeTransform