Using BinaryObjects as Content Images

In addition to being able to use the File Download Manager to download files in a secure and consistent way, the File Download Manager can also be used to render images and pictures that have been uploaded as BinaryObjects as shown in the following example:

 

An Image Rendered from a BinaryObject

An Image Rendered from a BinaryObject

 

Defining the BinaryObject

In the above example, a BinaryObject was created with the following properties: 

BinaryObject Editor

In terms of using this BinaryObject as an image in our content, we are specifically interested in the following properties:

PropertyValue
Virtual URL //Root/Content/Documentation/BinaryObjects/Images/Lemons 
Image Width 350 pixels
Image Height 102 pixels
Return to top of page

Creating the Image Tag

Using our standard CmsObject addressing model, we can therefore define this BinaryObject as:

/Content/Documentation/BinaryObjects/Images/Lemons.aspx

 

[Note, if a QuickLink had been defined for the BinaryObject, we could have equally as easily have used that with the QuickLink URL ReWriter syntax]

This address will become the source for our File Download Manager page (e.g. /UI/Viewer.aspx), which in turn will become the source for our image tag (<img .../>) ...

<img alt="An image rendered from a BinaryObject"
Continued from preceding linewidth="350" height="102" src="/UI/Viewer.aspx?
Continued from preceding linesrc=/Content/Documentation/BinaryObjects/Images/Lemons.aspx" />

 

Of course, if you don't like the look of all this XHTMLExtensible HyperText Markup Language markup, there is an easier way! Simply use the Content Editor's Image Properties Manager.

First, click the Editor's Image Properties icon Image Properties Icon. The Image Properties dialog box will open and you can specify the properties as defined above. 

 

Image Properties Dialog

Return to top of page 

See Also: