wiki-image
The wiki-image
component displays an image from Wikimedia Commons. This helps easy
reuse of millions of free licensed images from Wikimedia Commons anywhere in the web.
Image caption and attribution to the author of the image is automatically added to the image. The image is displayed in a responsive way.
Attributes
source
: The source of the image. It can be a file name or a URL.width
: The intrinsic width of the image in pixels. Must be an integer without a unit.height
: The intrinsic height of the image in pixels. Must be an integer without a unit.loading
:lazy
: The image will be loaded lazily.eager
: The image will be loaded eagerly.
fetchpriority
:auto
: The browser will determine the priority of fetching the image.high
: The image will be fetched with high priority.low
: The image will be fetched with low priority.
decoding
:auto
: The browser will determine the decoding strategy.sync
: The image will be decoded synchronously.async
: The image will be decoded asynchronously.
Examples
<wiki-image source="File:Pont_Royal_and_Musée_d'Orsay,_Paris_10_July_2020.jpg">
</wiki-image>
<wiki-image
source="https://commons.wikimedia.org/wiki/File:023_African_pygmy_kingfisher_at_Kibale_forest_National_Park_Photo_by_Giles_Laurent.jpg">
</wiki-image>