summaryrefslogtreecommitdiff
path: root/src/web/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/web/lib/image.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/web/lib/image.php b/src/web/lib/image.php
index 7b6ec0e..a36b985 100644
--- a/src/web/lib/image.php
+++ b/src/web/lib/image.php
@@ -41,6 +41,7 @@ function __make_source(
function image(
$name,
$alt,
+ $title = NULL,
$formats = array('webp', 'png'),
$animated = FALSE,
$attrs = array(),
@@ -75,7 +76,10 @@ function image(
if ($alt) {
$alt = lang($alt);
$attrs['alt'] = $alt;
- $attrs['title'] = $alt;
+ }
+ if ($title) {
+ $title = lang($title);
+ $attrs['title'] = $title;
}
if ($width) {
$attrs['width'] = $width;