CMS » Documentation » How to add an image

How to add an image

1. From the Control Panel choose "New asset" in the editor of Images & Files

2. You can upload up to 3 different images at one time. At the end you will find the list of fields you can use.

3. Save your image. The name of the image (e.g. i_mypicture) can be then used in templates and documents in form: $i_mypicture
- this will display the picture on your page according to the defined settings.

This is the most common way:
1. Choose a gif/jpg picture of nice size, e.g. 600x300 pixels.
2. Choose type: a. Image with link to original size image
3. Set smaller size in settings - e.g. 200 - this will automatically save your picture resized to 200x100 pixels and (!) store the original picture size (under slightly different filename) as well.
4. Then if you use $i_yournameofthepicture in your documents this happens:
 - the smaller size picture will be displayed on your page
 - the picture will link to a page with picture in its original size
 - as title of the picture you will see its description with the size of original picture in brackets (user will know what time to expect when clicking on the picture and opening the page with original picture)

Fields description:

Name Name your image. The name must begin with image identifier, such as i_. If you delete this part, it will be added automatically. The image identifier is set up once at the beginning in the configuration. Any name will be stripped of most special characters and spaces will be converted to underscore.
File Choose the file from your computer
Folder Physical folder to store the asset/image (defined in CMS configuration)

a. Image with link to original size image - most commonly used, see desciption above.
b. Image with link specified in settings - if your image
c. Image with no link - if you need an image for graphics usage only.  The same effect can be achieved, when using the full path to the image via html in your document. It is your choice. The advantage of using the variable ($i_mypicturename) is that the system computes picture width and height values for you automatically, thus making your site look professional.
d. File (not an image) - if you upload a file (e.g. a *.doc document), it is a good idea to store it in a separate folder devoted to similar assets only.
e. Code (administrators only) - php code can be used to provide customized applets/functions. This is the most flexible feature of the CMS, though the most dangerous one, therefore please leave this to your programmers.

Owner This person only (plus administrator) can change/update the asset.

a. if you want your original picture to be resized, put here the new size in pixels, e.g. 200
 - the bigger side of the picture (either width or height) will be adapted to this value
b. if the picture should link to an external site, put here the url (always begin with http://)
e. PHP code (administrators only)

Description Description is in case of images displayed as title for the picture.


about | documentation ©2003