images
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
images [2020-11-22 03:05] – [Removing Media] Fred23 | images [2023-11-09 12:45] (current) – Added a note about spaces preceding the title marker | causing issues in dw2pdf generated PDFs 80.209.162.130 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Image and Media Handling ====== | ||
+ | You can upload and embed other files into [[DokuWiki]] pages with the [[wiki: | ||
+ | ===== Uploading ===== | ||
+ | {{: | ||
+ | Uploading new files is done with the [[media manager|media manager popup]] called by button {{https:// | ||
+ | |||
+ | 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. | ||
+ | |||
+ | ===== Embedding ===== | ||
+ | |||
+ | Use '' | ||
+ | |||
+ | {{wiki: | ||
+ | {{wiki: | ||
+ | |||
+ | An image {{wiki: | ||
+ | |||
+ | You may use '' | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | //When adding a title you should not have a space before the '' | ||
+ | |||
+ | |||
+ | How images are embedded can be influenced by various parameters. Parameters are added in URL style by appending a question mark (''?'' | ||
+ | |||
+ | =====Alignment===== | ||
+ | |||
+ | By using left or right whitespaces you can choose left, right or center alignment. | ||
+ | |||
+ | {{ wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | {{ wiki: | ||
+ | |||
+ | {{ wiki: | ||
+ | {{wiki: | ||
+ | {{ wiki: | ||
+ | |||
+ | ===== Resizing ===== | ||
+ | |||
+ | DokuWiki can rescale images with two methods. By default it uses PHP's libGD support if installed. Better results can be achieved with the [[config: | ||
+ | |||
+ | When using libGD, resizing can fail when not enough memory is available or the image format is not supported by the installed libGD version. | ||
+ | |||
+ | For resizing external images, they need to be cached at your server. To do that, you have to allow DokuWiki to download external files by increasing the size restriction in the [[config: | ||
+ | |||
+ | To scale an image proportionally, | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | Or to scale an image proportionally in height, give the wanted height in Pixels, preceeded by a width of 0: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | When you give the width and height, DokuWiki will crop the image before scaling to avoid distorting the image: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | |||
+ | ===== Linking ===== | ||
+ | |||
+ | [[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. | ||
+ | |||
+ | By default, clicking on an image brings up a " | ||
+ | |||
+ | 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: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | 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 " | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | It is also possible to embed an image in the page without having the image link to any other page. You accomplish this with the '' | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | You can also combine the ' | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | If you just want to provide a link to the image without displaying it inline, use the '' | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | {{wiki: | ||
+ | |||
+ | |||
+ | ==== Linking from non-DokuWiki syntax ==== | ||
+ | |||
+ | This would be useful for example when you are using the '' | ||
+ | |||
+ | Basically you just copy the code generated by DokuWiki, but __you can't use resizing__. The generated URL generally has three parameters; '' | ||
+ | |||
+ | While you could copy the '' | ||
+ | |||
+ | Example: | ||
+ | |||
+ | < | ||
+ | DIV.personal_info { | ||
+ | ... | ||
+ | background-image: | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Dynamic Images ===== | ||
+ | |||
+ | Sometimes you may want to embed a dynamic image like [[http:// | ||
+ | |||
+ | Using the usual method: | ||
+ | |||
+ | {{http:// | ||
+ | |||
+ | doesn' | ||
+ | |||
+ | {{http:// | ||
+ | |||
+ | This is because [[DokuWiki]] assumes an image ends with '' | ||
+ | |||
+ | 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 '' | ||
+ | |||
+ | Example of usage of the ''& | ||
+ | |||
+ | {{http:// | ||
+ | |||
+ | |||
+ | {{http:// | ||
+ | |||
+ | |||
+ | BTW: You can find buttonmaker webfrontends at | ||
+ | |||
+ | * http:// | ||
+ | |||
+ | ===== Removing Media ===== | ||
+ | |||
+ | 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 '' | ||
+ | |||
+ | See also: [[faq: | ||
Line 9: | Line 173: | ||
To link images to other resources, simply pipe that link into the image, as you would with any other text. | To link images to other resources, simply pipe that link into the image, as you would with any other text. | ||
- | Example: | + | Example: [[http:// |
- | Example: | + | Example: [[http:// |
Line 20: | Line 184: | ||
| | ||
+ | ===== Caching ===== | ||
+ | |||
+ | To improve the performance for the user, DokuWiki tries to cache external images. If you want to use an external image without caching you can add the '' | ||
+ | |||
+ | {{http:// | ||
+ | |||
+ | You can combine this parameter with resizing, too. | ||
+ | |||
+ | {{http:// | ||
+ | |||
+ | Hitting an external Server on every pageload isn't very polite. Instead you can use the parameter '' | ||
+ | |||
+ | {{http:// | ||
images.1606010703.txt.gz · Last modified: by Fred23