DokuWiki

It's better when it's simple

User Tools

Site Tools


images

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
images [2013-03-26 11:13]
86.33.133.61 [Dynamic Images] remove yugatech dead link
images [2018-01-04 12:48] (current)
Klap-in pointers to video
Line 1: Line 1:
 ====== Image and Media Handling ====== ====== Image and Media Handling ======
  
-You can upload and embed other files into [[DokuWiki]] pages with the [[wiki:​syntax#​images_and_other_files|Image Syntax]]. While images and Flash media are displayed right on the page, other files (such as PDF documents) are just linked to from the document. Please see [[mime]] for detailed information.+You can upload and embed other files into [[DokuWiki]] pages with the [[wiki:​syntax#​images_and_other_files|Image Syntax]]. While images, audio and [[video]] ​media are [[wiki:​syntax#​supported_media_formats|displayed right]] on the page, other files (such as PDF documents) are just linked to from the document. Please see [[mime]] for detailed information.
  
-====Uploading==== +===== Uploading =====
-{{:​wiki:​mediamanager.png?​200 |The Media Manager}}+
  
-{{http://wiki.splitbrain.org/​lib/​images/​toolbar/​image.png}} ​Uploading new files is done with the [[media manager]] called from the [[toolbar]]. +{{:​wiki:​mediamanager.png?​200 |The Media Manager popup}} 
 + 
 +Uploading new files is done with the [[media manager|media manager popup]] called by button ​{{http://dokuwiki.org/​lib/​images/​toolbar/​image.png}} ​of the [[toolbar]] of the [[Edit window]]. 
  
 Just use the upload form at the top right to upload a file. Optionally you can give a new name for the file. Be sure to keep the file extension correct! If you use new [[namespaces]] in the name these will be created automatically. Just use the upload form at the top right to upload a file. Optionally you can give a new name for the file. Be sure to keep the file extension correct! If you use new [[namespaces]] in the name these will be created automatically.
 +
 +The [[fullscreen mediamanager|fullscreen media manager]] lets you also upload images and [[video|videos]]. Besides it can show media revisions and edit the image metadata as well.
  
 Please note: If the administrator enabled [[ACL]] support, upload may be restricted to certain users. Users without the proper permission will not see the upload form. Please note: If the administrator enabled [[ACL]] support, upload may be restricted to certain users. Users without the proper permission will not see the upload form.
  
-====Embedding====+===== Embedding ====
 Use ''​{{}}''​ to embed your media Use ''​{{}}''​ to embed your media
  
   {{wiki:​dokuwiki-128.png}}   {{wiki:​dokuwiki-128.png}}
   {{wiki:​text2html.rc}}   {{wiki:​text2html.rc}}
 + 
 An image {{wiki:​dokuwiki-128.png?​30}} is displayed and other media {{wiki:​text2html.rc}} shows only a link with matching icon. An image {{wiki:​dokuwiki-128.png?​30}} is displayed and other media {{wiki:​text2html.rc}} shows only a link with matching icon.
  
Line 55: Line 59:
  
 {{wiki:​dokuwiki-128.png?​20 }} This image is scaled down to a width of 20 pixels. {{wiki:​dokuwiki-128.png?​20 }} This image is scaled down to a width of 20 pixels.
 +
 +Or to scale an image proportionally in height, give the wanted height in Pixels, preceeded by a width of 0:
 +
 +  {{wiki:​dokuwiki-128.png?​0x20}}
 +
 +{{wiki:​dokuwiki-128.png?​0x20 }} This image is scaled down to a height of 20 pixels.
  
 When you give the width and height, the image will be scaled to exactly that height, ignoring the aspect ratio: When you give the width and height, the image will be scaled to exactly that height, ignoring the aspect ratio:
Line 68: Line 78:
 [[DokuWiki]] allows you to put images in a page and have them link to a page providing details about the image or to a page that contains the full image. ​ It also allows you to include images that do not link to any other page. [[DokuWiki]] allows you to put images in a page and have them link to a page providing details about the image or to a page that contains the full image. ​ It also allows you to include images that do not link to any other page.
  
-By default, clicking on an image brings up a "​detail"​ page.  The detail page is rendered by the  ''​detail.php''​ template file.  The standard ''​detail.php''​ file shows a larger version of the image along with a listing of EXIF and IPTC metadata contained within ​the the image (such as caption, author, date taken, etc.), along with other descriptive information.+By default, clicking on an image brings up a "​detail"​ page.  The detail page is rendered by the  ''​detail.php''​ template file.  The standard ''​detail.php''​ file shows a larger version of the image along with a listing of EXIF and IPTC metadata contained within the image (such as caption, author, date taken, etc.), along with other descriptive information.
  
 The following syntax embeds an image in the page at full size, and clicking on this image produces a detail page providing metadata for the image: The following syntax embeds an image in the page at full size, and clicking on this image produces a detail page providing metadata for the image:
Line 74: Line 84:
   {{wiki:​dokuwiki-128.png}}   {{wiki:​dokuwiki-128.png}}
  
-{{wiki:​dokuwiki-128.png?​20}} Try clicking on this scaled-down image to see its detail page.+{{wiki:​dokuwiki-128.png?​25}} Try clicking on this scaled-down image to see its detail page.
  
-You may click on the image shown on the details page to get yet another page the contains only the image, shown at its actual size.  Often you'll embed the image on a page at a small size and show the image on a detail page at a medium size, so that only this final direct link provides the image at its full size.+You may click on the image shown on the details page to get yet another page that contains only the image, shown at its actual size.  Often you'll embed the image on a page at a small size and show the image on a detail page at a medium size, so that only this final direct link provides the image at its full size.
  
 You may instead embed an image on a page such that clicking on it brings you directly to the full image in its own page.  This is called a "​direct"​ link, and it's indicated by appending the ''​direct''​ option to the image: You may instead embed an image on a page such that clicking on it brings you directly to the full image in its own page.  This is called a "​direct"​ link, and it's indicated by appending the ''​direct''​ option to the image:
Line 103: Line 113:
  
  
 +==== Linking from non-DokuWiki syntax ====
  
 +This would be useful for example when you are using the ''​%%<​HTML>​%%''​ tags to enhance visual aspects in your page, wanting to have a ''<​DIV>''​ background image from the DokuWiki media storage.
 +
 +Basically you just copy the code generated by DokuWiki, but __you can't use resizing__. The generated URL generally has three parameters; ''​media'',​ ''​w''​ and ''​tok'',​ and resizing with ''​w''​ (defining the desired width of the image) does not work unless ''​tok''​ parameter is also given. In other words, you can only give ''​media''​ URL parameter.
 +
 +While you could copy the ''​tok''​ from generated code and use the URL in your HTML, it would break as soon as the image in question is replaced with updated content, for example.
 +
 +Example:
 +
 +<​code>​
 +DIV.personal_info {
 +  ...
 +  background-image: ​ url('​{/​install_dir}/​lib/​exe/​fetch.php?​media=name:​space:​mypic.png'​);​
 +}
 +</​code>​
 ===== Dynamic Images ===== ===== Dynamic Images =====
  
Line 119: Line 144:
  
 You also need to add a question mark at the very end or DokuWiki will think the CGI parameters are caching options. You also need to add a question mark at the very end or DokuWiki will think the CGI parameters are caching options.
 +
 +For use of ''​{''​ or ''​}''​ in the image url these need to be URL-encoded as ''​%7B''​ and ''​%7C''​ (it clashes with the media link syntax otherwise)
 +
 +Example of usage of the ''&​.png?''​ syntax:
  
 {{http://​kalsey.com/​tools/​buttonmaker/​button.php?​barPosition=50&​leftText=Dynamic&​leftTextColor=ffffff&​rightText=IMG&​rightTextPosition=54&​.png?​}} {{http://​kalsey.com/​tools/​buttonmaker/​button.php?​barPosition=50&​leftText=Dynamic&​leftTextColor=ffffff&​rightText=IMG&​rightTextPosition=54&​.png?​}}
Line 132: Line 161:
 ===== Removing Media ===== ===== Removing Media =====
  
-It is sometimes necessary to remove a media, which was being uploaded before. To do this the [[ACL]] feature needs to be enabled and the user who wants to delete files needs to have the ''​DELETE''​ permission. Files can be deleted with the garbage can icon then.+It is sometimes necessary to remove a media file, which was being uploaded before. To do this the [[ACL]] feature needs to be enabled and the user who wants to delete files needs to have the ''​DELETE''​ permission. Files can be deleted with the garbage can icon then.
  
 See also: [[faq:​deletemedia|deleting media files]] See also: [[faq:​deletemedia|deleting media files]]
Line 165: Line 194:
  
   {{http://​de3.php.net/​images/​php.gif?​recache}}   {{http://​de3.php.net/​images/​php.gif?​recache}}
 +
images.1364292820.txt.gz · Last modified: 2013-03-26 11:13 by 86.33.133.61