Skip to main content
History: Help - Images
View published page
Source of version: 85
(current)
{BOX(class="Layout_box6",width="100%")}{CUT(colsize=5%|70%)}{img fileId="1752"}---{DIV(class="bigBold")}An Image is worth a thousand words{DIV} Here's how you add images to a page, and style them.{CUT}{BOX} {maketoc} ---- !Introduction Even though it's easy to upload and display images in Tiki, it can be confusing because: * Images are referred to by their fileId, not their name * Two different syntaxes for images exist: IMG and '''img''' * The File Gallery interface is powerful, but requires you to know how it works. However, if you follow some simple rules, putting images on your wiki pages will become easy. !Adding Images Click the image gallery icon {IMG(src="pics/icons/pictures.png")}{IMG} on the toolbar to choose or upload images. {img fileId="1762"} What to do next depends on whether you want to upload a new image or insert an existing image. !!Add A New Image If you want to upload a new image, click the '''Advanced Mode''' button in the dialogue first. While you ''can'' upload from the basic interface, it is recommended to use the Advanced Mode interface instead because there you can choose in which file gallery to put the uploaded image(s). If none of the existing files galleries suits you, you can {ALINK(aname="Creating a File Gallery")}create your own file gallery{ALINK}. {img fileId="1751"} The Advanced Mode interface allows you to set a title, description and choose which file gallery to put the uploaded image into. The last bit is important, because we have over 1000 images currently, and it would be nice to be able to find those uploaded images easily. Not only for image reuse, but also for __''updating''__ those images. The Advanced Interface allows allows you to add more images before uploading, which is quite handy: Simply click '''Add File''' instead of '''Upload''' to add another image. {SPLIT()}{img fileId="1748" thumb="mouseover" width="300"}---{img fileId="1747" thumb="mouseover" width="300"}{SPLIT} {TRANSCLUDE(page="dobox")}Use Advanced Mode to upload __all__ your images in one go! If you upload images one by one, you have to save the page between each image insert due to what appears a bug, but it's also faster to upload all your images for a page in one operation.{TRANSCLUDE} After you've done uploading, you can insert the image into your wiki page by clicking the insertion link. You should see something like this: {CODE()}{img fileId="1683" thumb="y" alt="" rel="box[g]"}{CODE} --- !!Working With Images By default, images are thumbnails and uses the ColorBox effect when clicking them. The newly inserted image looks like this: {img fileId="1683" thumb="y" alt="" rel="box[g]"} Most of the time, this is what you want, although the default size of the image is a bit too small for most uses. So all you have to do, is put in a '''width''' parameter: {CODE()}{img fileId="1683" thumb="y" alt="" rel="box[g]" width="300"}{CODE} And your thumbnail is ready: {img fileId="1683" thumb="y" alt="" rel="box[g]" width="300"} If you want the image to float, set the '''imalign''' parameter to either '''right''' or '''left''': {CODE()}{img fileId="1683" thumb="y" alt="" rel="box[g]" width="300" imalign="right"}{CODE} {img fileId="1683" thumb="y" alt="" rel="box[g]" width="300" imalign="right"} And now your image will be floating to the right. However, sometimes you don't want a thumbnail, so you just remove it: {CODE()}{img fileId="1683"}{CODE} And your image will show as-is. Looking at the floating image to the right here, you probably notice that there is no padding around the image. %clear% {img fileId="1683" thumb="y" alt="" rel="box[g]" width="300" imalign="right" class="padded"} You can fix that easily by using the '''{ALINK(aname="padded",pagename="Wiki Styles")}padded{ALINK}''' class: {CODE(wrap="1")}{img fileId="1683" thumb="y" alt="" rel="box[g]" width="300" imalign="right" class="padded"}{CODE} And you should see some padding around the image. If you want to adjust the properties of an image, you can use the image button {IMG(src="pics/icons/picture.png")}{IMG} on the toolbar: select the image tag and use the image tag editor to set its properties. %clear% {TRANSCLUDE(page="warndiv")}Use '''imalign''' when aligning images, '''align''' to align images in a style box ('''stylebox="border"'''){TRANSCLUDE} {TRANSCLUDE(page="infobox")}There is two different image plugin syntaxes: {CODE()}{img parameter parameter}{CODE} {CODE()}{IMG(parameter, parameter)}{IMG}{CODE} It's mostly the same, except that the first one is lowercase '''img''', doesn't use parentheses around the parameters, allows the arguments to be separated by space instead of commas, and doesn't have an '''ending'''-tag. Clicking the image button {IMG(src="pics/icons/picture.png")}{IMG} will convert the former syntax into the latter. {TRANSCLUDE} --- !!Insert An Existing Image In the upload dialogue, click '''Browse Gallery'''. You are now taken to the File Gallery page where you can find existing images. {img fileId="1763" thumb="y" alt="" rel="box[g]" width="300" imalign="left" class="padded"} A good idea to check '''keep gallery window open''' if you're planning to insert multiple images. By clicking the wrench icon you can perform operations on the individual images, like '''Display''', '''Replace''', etc. You can also click the '''Browse Images''' button if you want. For more on the File Gallery, see {ALINK(aname="File Gallery")}below{ALINK}. %clear% --- !Image Syntax {CODE(caption="Image Example Syntax",wrap="1")}{img fileId= , height= , width= , max= , link= , thumb=, rel=, class= , imalign= , stylebox= , desc= , title=}{CODE} || {MONO()}fileId{MONO} | The File Gallery Id {MONO()}height{MONO} | sets the height of the image {MONO()}width{MONO} | sets the width of the image {MONO()}max{MONO} | set this to maintain aspect ratio: it takes the largest value of width/height%%%and sets that to '''max''' {MONO()}link{MONO} | name of wiki page to link to (without parentheses) or external link {MONO()}thumb{MONO} | set to '''y''' to turn image into a thumbnail - It's suggested to use this parameter together with ''rel="box[[g]"''. {MONO()}rel{MONO} | set to '''box''' or '''box[[g]''' to show image in ColorBox when clicking a thumbnail - Means: The enlarged picture will be shown as overlay image (web 2.0 style) without leaving the page. It's a fine option for thumbnail images. {MONO()}class{MONO} | set to CSS class to style the image tag. (See ((Wiki Styles)) ) {MONO()}imalign{MONO} | '''left''' or '''right''' - floats the image {MONO()}stylebox{MONO} | set to '''border''' to make a border around the image {MONO()}desc{MONO} | text to be shown underneath the image (or in Colorbox popups) {MONO()}title{MONO} | text to be shown as title popup upon mouse over || Visit tikiwiki.org for the full list of available parameters. {TRANSCLUDE(page="seebox")}[http://doc.tikiwiki.org/Wiki-Syntax+Images] [http://doc.tikiwiki.org/PluginImg]{TRANSCLUDE} --- !The File Gallery The File Gallery is a very powerful tool. (:smile:) You can browse, move and replace images and create file galleries. !!Browsing Images When viewing the file gallery, you can switch to image browse mode by clicking the '''Browse Images''' button. Here's how the {MONO()}Community -> Wiki Help - Images{MONO} gallery looked like when this wiki page was written: {img fileId="1746" thumb="y" alt="" rel="box[g]" width="300"} Notice how all the images for this page are neatly tucked away in a gallery of their own. --- !!Creating a File Gallery To create a File Gallery, click the '''Create A File Gallery''' button in the Gallery Browser: {img fileId="1742" thumb="y" alt="" rel="box[g]" width="300"} In the Create Gallery screen, give the gallery a descriptive name: {img fileId="1741" thumb="y" alt="" rel="box[g]" width="300"} {TRANSCLUDE(page="warndiv")}Make sure that you set the gallery to __'''public'''__! Otherwise no one is able to use it (but you).{TRANSCLUDE} The gallery will be created as a child of the gallery you're in. So if you want to add a gallery under '''Icons''', stand in the icons gallery when creating it. --- !!Moving images and galleries The File Gallery interface allows you to move images (files) and galleries around. To move images and/or galleries, select them in the explorer. You can hover your mouse over the '''backlinks''' link to see what page they're used in. {img fileId="1744"} Once selected, click the '''move''' icon in the action toolbar, and when the page has refreshed, select what gallery to move to: {img fileId="1743"} --- !!Replacing Images It happens frequently: you've uploaded some images, and now they're already obsolete and needs to be replaced. You could just upload a new image, and then update the links to it, but there's a better way! Click '''replace''' in the wrench icon dialogue: {img fileId="1745" thumb="y" alt="" rel="box[g]" width="300"} You can now upload a new version of the image. And, like magic: each occurrence of that image is replaced by the new one. {TRANSCLUDE(page="infodiv")}__Q:__ I've just replaced an image, and nothing happens! (:surprised:) __A:__ The image __''has''__ been replaced, of course. But you can't see it due to the wiki pages being cached (for performance reasons). Either wait for the cache to clear, or clear the cache from the Admin menu (if you have the permission to do so) and you should see that the image indeed has been replaced.{TRANSCLUDE} {TRANSCLUDE(page="dobox")}Use Image Replace to update existing images to a new version!{TRANSCLUDE} --- !Good Practices !!Use File Galleries Put your images in file galleries according to their scope. For instance, if you're uploading an image for an article in the '''Cookbook - Snippets''' section, put the image into the '''Cookbook - Snippets''' gallery. If you're using more than one image, consider making a child gallery under '''Cookbook - Snippets''' with the name as your wiki page to hold all wiki images for that page. It makes it easy to find the images later on. And update them when that time comes. Icons and other common elements, which are meant to be reused, are not going to be reused if they cannot be found! So take some time when uploading your images and save a lot of time later. (:smile:) !!Image Sizes Choosing the right size for your images is important for good looks. Here's some recommendations. !!!Thumbnails When creating images like screenshots, etc. to be used as thumbnails, scale them down to 80% of original size, before uploading them. The rest of the down-scaling will be done by the thumb-nailing code. !!!Icons Due to a bug in the way Tiki handles transparent PNG icon images, you need to upload them pre-scaled. The problem becomes obvious when using the '''width''' or '''height''' parameters on a png image with transparency: {img fileId="1736" width="40"} As you can see, the transparent part of the image is not handled properly.. Without setting the '''width''' parameter, it shows correctly: {img fileId="1736"} It doesn't happen when using gif's. But png looks better. Common sizes are: 128px, 64px and 48px. Name them according to their size, i.e. '''ogrehead-48.png''', etc. And be sure to upload them to the '''Icons''' File Gallery! (:smile:) --- !Neat Tricks Some good tips which you might find handy. (:smile:) !!Floating Screenshots __The Problem:__ If you're trying to create a page with two or three screenshots floated to the right, you'll probably have a very hard time trying to make them float on top of each other, instead of halfway side by side: {CODE(wrap="1")}{img fileId="1734" align="right" stylebox="border"} {img fileId="1734" align="right" stylebox="border"}{CODE} {img fileId="1734" align="right" stylebox="border"} {img fileId="1734" align="right" stylebox="border"} The problem is obvious, but the solution is not so obvious! __The Solution:__ Use the class '''clearRight''': {CODE(wrap="1")}{img fileId="1734" imalign="right" class="clearRight"} {img fileId="1734" imalign="right" class="clearRight"}{CODE} {DIV(class="clearRight")}{img fileId="1734" stylebox="border"} {img fileId="1734" stylebox="border"}{DIV} If using '''stylebox="border"''' you need to use a DIV around eage image instead (and use '''align''' instead of '''imalign'''): {CODE(wrap="1")} {DIV(class="clearRight")}{img fileId="1734" align="right" stylebox="border"}{DIV} {DIV(class="clearRight")}{img fileId="1734" align="right" stylebox="border"}{DIV} {CODE} And your images are neatly aligned to the right! (:biggrin:) !!Application Screenshots For embedding screenshot images to the wiki page, we recommend to use these code snippets. Notes: * Images will be shown with a width of 300 pixels * The subtitle ''click to enlarge'' tells the page visitor that enlarging is possible * Full size images are displayed by pleasant web 2.0 overlay * When you want to add screenshots of applications / add-ons / libraries, you should set the cathegory flag for ''screenshots of applications'' at the image upload process. Preview of the examples: {DIV()}{IMG(fileId="2066", thumb="y", rel="box[g]", width="300", align="left", stylebox="border", desc="Example 1")}{IMG}{DIV} {DIV()}{IMG(fileId="2064", thumb="y", rel="box[g]", width="300", align="left", stylebox="border", desc="Example 2")}{IMG}{DIV} {DIV()}{IMG(fileId="2065", thumb="y", rel="box[g]", width="300", align="left", stylebox="border", desc="Example 3")}{IMG}{DIV} %clear% !!!Example 1 * Displays a single image on right side * It doesn't break the text flow * Recommend: Include the code at the first line of wiki code (above section title) {CODE(wrap="1")} {DIV(class="clearRight")}{img fileId="..." align="right" thumb="y" rel="box[g]" width="300" desc="click to enlarge" stylebox="border"}{DIV} {CODE} !!!Example 2 * Displays multiple images on right side * Pictures are aligned vertically * It doesn't break the text flow * Recommend: Include the code at the first line {CODE(wrap="1")} {DIV(class="clearRight")}{img fileId="..." align="right" thumb="y" rel="box[g]" width="300" desc="click to enlarge" stylebox="border"}{DIV} {DIV(class="clearRight")}{img fileId="..." align="right" thumb="y" rel="box[g]" width="300" desc="click to enlarge" stylebox="border"}{DIV} {DIV(class="clearRight")}{img fileId="..." align="right" thumb="y" rel="box[g]" width="300" desc="click to enlarge" stylebox="border"}{DIV} {CODE} !!!Example 3 * Displays multiple images with horizontal alignment * Good for screenshot related sections * Include the code where you want * __Important:__ Don't forget the ''clear'' command below the images {CODE(wrap="1")} {DIV()}{IMG(fileId="...", thumb="y", rel="box[g]", width="300", align="left", stylebox="border", desc="click to enlarge")}{IMG}{DIV} {DIV()}{IMG(fileId="...", thumb="y", rel="box[g]", width="300", align="left", stylebox="border", desc="click to enlarge")}{IMG}{DIV} {DIV()}{IMG(fileId="...", thumb="y", rel="box[g]", width="300", align="left", stylebox="border", desc="click to enlarge")}{IMG}{DIV} %clear% {CODE}
Search by Tags
Search Wiki by Freetags
Latest Changes
Projects using OGRE
Building Your Projects With CMake
Compiled API Reference
Overlay Editor
Introduction - JaJDoo Shader Guide - Basics
RT Shader System
RapidXML Dotscene Loader
One Function Ogre
One Function Ogre
...more
Search
Find
Online Users
155 online users
OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username
Password
CapsLock is on.
Remember me (for 1 year)
Log in