Methods
-
isImage()
→ bool
-
Returns
true if this asset is an image, false otherwise. If the asset
does not have any mime-typed format variants, it will assume that it is
an image, even if it isn't.
-
nearestVariantUrl({required MediaAssetFormatVariant variant})
→ String
-
Looks up the specified format variant in the asset and returns the
corresponding URL. If the URL is not found, it will return the next
largest variant. If none are found, will return the asset's main URL.
This method is designed to work with image assets that reside in Strapi's
media library.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a non-existent method or property is accessed.
inherited
-
rebuild(dynamic updates(MediaAssetBuilder))
→ MediaAsset
-
Rebuilds the instance.
inherited
-
toBuilder()
→ MediaAssetBuilder
-
Converts the instance to a builder
B.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited