This plugin let's you access over 1 mililion stock images, videos and illuatrations of pixabay.
Pixabay is a vibrant community of creatives, sharing copyright free images and videos. All contents are released under the Pixabay License, which makes them safe to use without asking for permission or giving credit to the artist - even for commercial purposes.
If you use this plugin and the Pixabay API, a link to Pixabay is required and you may use their logo for this purpose.
By default, you can make up to 5,000 requests per hour towards pixabay.com. Requests are associated with an API key, and not with your IP address.
In addition this plugin caches query results to pixabay.com for a certain period of time, a day by default.
Returned images are cached on this server and not hotlinked their source location on pixabay.com. This is not only required due to the API usage guidelines
but also comes with a certain performance advantage compared to other image services such as unsplash.com.
Usage
Images and videos are made available to Foswiki using the %PIXABAY{...}% macro. The macro may return a list of images or videos, not only one.
You may page through this list using the skip and limit parameters.
kind of resource to query. possible values: photo, illuatrations, vector, video, film, animation, allimages, allvideos
photo
skip
page through the list of images/videos found by the search term
0
size
accepted values for images: web, preview, large, orig, fullHD; accepted values for videos: tiny, small, medium, large
separator
format string between each fetched resource
safesearch
a flag indicating that only images/videos suitable for all ages should be returned.
off
random
integer specifying a range within which a skip value is piced randomly; the higher the parameter the more random results will be returned
0
orientation
(only images) whether an image is wider than it is tall, or taller than it is wide. accepted values: all, horizontal, vertical
all
order
how the results should be ordered. accepted values: popular, latest
popular
mute
(only videos) flag to mute or unmute audio of a video
on
min_width
minimum image width
0
min_height
minimum image height
0
loop
(only videos) flag to loop a video or only play it once
on
limit
number if images/videos to return
1
lang
language code of the language to be searched in. accepted values: cs, da, de, en, es, fr, id, it, hu, nl, no, pl, pt, ro, sk, fi, sv, tr, vi, th, bg, ru, el, ja, ko, zh
en
id
retrieve individual images by iD. the id normally is a numeric value which may also be specified as a search term.
height
explicit height of the image/video
height of the resource as returned by pixabay
header
string to be prefixed to results
format
format string to render the fetched resource.
for images: <img src='$url' width='$width' height='$height' alt='$id' $class /> for videos: <video width='$width' height='$height' $controls $autoplay $muted $loop $class alt='$id'>Your browser does not support the video tag.</video>
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. "Extensions Operation and Maintenance" Tab → "Install, Update or Remove extensions" Tab. Click the "Search for Extensions" button.
Enter part of the extension name or description and press search. Select the desired extension(s) and click install. If an extension is already installed, it will not show up in the
search results.
You can also install from the shell by running the extension installer as the web server user: (Be sure to run as the webserver user, not as root!)
cd /path/to/foswiki
perl tools/extension_installer <NameOfExtension> install