ImageCompare

ImageCompare (name inspired by a MediaWiki extension with the same name) allows overlapping two images with a middle slider for easy comparison.
== ==
== ==
The script responds to elements marked by certain classes. The expected structure is:
* A container with the class "img-comp-container".
** A child element with the class "img-comp-img", containing the base image.
** Another child element with the two classes "img-comp-img img-comp-overlay", containing the overlay image.
=== Adjusting the dimensions ===
The script expects the container and the images to have the same height. The default height is defined in the stylesheet as 200px, but any other height can be used by setting the style property of the container, or by overriding the default stylesheet with another one. The height of the images, if doesn't match, can be set by the standard wiki markup.
It is also recommended that the two images will have the same dimensions.
== ==
: Use this code:
[[File:WikiUpGreenForest.png|500px]]
[[File:WikiUpBrightBlue.png|500px]]
{{{caption|}}}
: Or create template with this code:
[[File:{{{right}}}|{{{size|500px}}}{{#ifeq:{{{nolink|0}}}|1|{{!}}link=|}}]]
[[File:{{{left}}}|{{{size|500px}}}{{#ifeq:{{{nolink|0}}}|1|{{!}}link=|}}]]
{{{caption|}}}
: And use it:
: Result
Caption text