Indeed:
- the
balise_imgfilter inserts an<img>tag regardless of the type of image received as an argument, including when it is an SVG file - the
balise_svgfilter always inserts an<svg>tag.
The balise_img_svg filter is therefore useful when applied to an image whose format is unknown in advance and when you want SVG images to be inserted with an <svg> tag.
This filter is applied to the relative URL of an image file or an already formed image tag. It accepts the following optional parameters:
-
alt: alternative text (or a null value to explicitly not have an alt tag on the image instead of an empty alt) -
class: null by default -
size: allows you to specify the size of the rendering (see syntax details: |balise_img)
Usage examples:
[(#LOGO_ARTICLE|balise_img_svg{'here application on an img tag', 'spip_logo'})]
[(#FICHIER|balise_img_svg{'here application on a file', 'spip_doc'})]
[(#CHEMIN{#GET{animage}}|balise_img_svg)]