A direct call to the IB: Media Picker field (as per the standard Umbraco approach) will always return a string to the Public CDN link.
You can also call specific properties of the IntelligenceBankMediaItem element. The available properties are:
- Name - Name of the Resource
- Description - Description of the Resource
- Type - Mimetype of the original Resource file. e.g. image/, video/, audio/, application/. For example: image/jpeg, video/mp4, audio/mp3, application/pdf
- Thumbnail - CDN link to a thumbnail of the original Resource file
- Url - CDN link to the file (original or preset)
- FileName - Name of the Resource file
- FileType - Extension of the original Resource file
- FileSize - Size of the original Resource file in bytes
- Width - Width of the original Resource file in pixels (if an image)
- Height - Height of the original Resource file in pixels (if an image)
- IBId - Resource Unique ID
- FileHash - Hash of the original Resource file
- VersionNumber - Version number of the Resource
- Preset - Preset Unique Id (if a Preset is used)
- PresetFileSize - Preset file size (if a Preset is used)
- PresetFileType - Extension of the preset (if a Preset is used)
- PresetCustomWidth - Preset custom width (if a Preset is used)
- PresetCustomHeight - Preset custom height (if a Preset is used)
- PresetName - Preset name (if a Preset is used)
Code example #1:
@Model.Value("ibImagePicker")
will return:
https://cdn.intelligencebank.com/us/share/09BB/ble6/r18e/preset=Ykq9/Stocksy_txp1933ead0uFG100_Large_445964
Code example #2:
<imgsrc="@Model.Value("ibImagePicker")"></img>
will return:
<imgsrc="https://cdn.intelligencebank.com/us/share/09BB/ble6/r18e/preset=Ykq9/Stocksy_txp1933ead0uFG100_Large_445964"></img>
Code example #3:
@Html.Raw(Model.Value<IntelligenceBankMediaItem>("ibImagePicker").FileName">
will return:
Stocksy_txp1933ead0uFG100_Large_445964.jpg
Comments
0 comments
Please sign in to leave a comment.