#CHEMIN_IMAGE

The tag #CHEMIN_IMAGE extends the #CHEMIN tag by including in the search the files located in the /prive/themes directories of SPIP and installed plugins.

Usage

#CHEMIN_IMAGE{article}

will return
prive/themes/spip/images/article-24.png

2nd example

[(#CHEMIN_IMAGE{cookie-32.png}|balise_img)]

will return
<img src="prive/themes/spip/images/cookie-32.png" alt="" width="32" height="32">

As of SPIP 4.0 : The argument can be a PNG file name containing a specified size as suffix: for example #CHEMIN_IMAGE{forum-public-24.png}.
In this case, if there is an SVG file in the path with the same name and size suffix (forum-public-24.svg) or with le suffix -xx polyvalent (forum-public-xx.svg) , the path to this SVG file is returned.
This makes it possible to
-  to benefit from SVG icons in SPIP 4
-  to benefit from a simplified SVG icon for small sizes
-  to keep compatibility with SPIP 3 thanks to the PNG version.

Searched paths

The image file passed as an argument is searched:
-  priority in the image folders of the private and plugins: subfolders /prive/themes/spip/images. By default the theme is ’spip’, but it is possible to change the theme by setting the constant _SPIP_THEME_PRIVE.
-  and, otherwise, in the subdirectories /images of the SPIP path and active plugins. This ’images/’ sub-path can be modified by setting the constant _NOM_IMG_PACK in your options file.

See also

#CHEMIN

The filters

Author jack Published : Updated : 17/09/22

Translations : English, français, Nederlands