===== Media Files ===== You can include external and internal [[doku>images|images, videos and audio files]] with curly brackets. Optionally you can specify the size of them. Real size: {{wiki:dokuwiki:dokuwiki-128.png}} Resize to given width: {{wiki:dokuwiki:dokuwiki-128.png?50}} Resize to given width and height((when the aspect ratio of the given width and height doesn't match that of the image, it will be cropped to the new ratio before resizing)): {{wiki:dokuwiki:dokuwiki-128.png?200x50}} Resized external image:           {{https://secure.php.net/images/php.gif?200x50}} Real size: {{wiki:dokuwiki-128.png}} Resize to given width: {{wiki:dokuwiki-128.png?50}} Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} Resized external image:           {{https://secure.php.net/images/php.gif?200x50}} By using left or right whitespaces you can choose the alignment. {{ wiki:dokuwiki:dokuwiki-128.png}} {{wiki:dokuwiki:dokuwiki-128.png }} {{ wiki:dokuwiki:dokuwiki-128.png }} {{ wiki:dokuwiki-128.png}} {{wiki:dokuwiki-128.png }} {{ wiki:dokuwiki-128.png }} Of course, you can add a title (displayed as a tooltip by most browsers), too. {{ wiki:dokuwiki:dokuwiki-128.png |This is the caption}} {{ wiki:dokuwiki-128.png |This is the caption}} For linking an image to another page see [[:wiki:syntax:links#image_links]] above. ==== Supported Media Formats ==== DokuWiki can embed the following media formats directly. | Image | ''gif'', ''jpg'', ''png'' | | Video | ''webm'', ''ogv'', ''mp4'' | | Audio | ''ogg'', ''mp3'', ''wav'' | | Flash | ''swf'' | If you specify a filename that is not a supported media format, then it will be displayed as a link instead. By adding ''?linkonly'' you provide a link to the media without displaying it inline {{wiki:dokuwiki-128.png?linkonly}} {{wiki:dokuwiki:dokuwiki-128.png?linkonly}} This is just a link to the image. ==== Fallback Formats ==== Unfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility. For example consider this embedded mp4 video: {{video.mp4|A funny video}} When you upload a ''video.webm'' and ''video.ogv'' next to the referenced ''video.mp4'', DokuWiki will automatically add them as alternatives so that one of the three files is understood by your browser. Additionally DokuWiki supports a "poster" image which will be shown before the video has started. That image needs to have the same filename as the video and be either a jpg or png file. In the example above a ''video.jpg'' file would work.