summaryrefslogtreecommitdiff
path: root/src/web/lib/image.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-02-24 08:32:34 -0500
committerFreya Murphy <freya@freyacat.org>2026-02-24 08:35:41 -0500
commit705edee6600d5d437cea5ab89fa008c748d4af11 (patch)
tree23f83695a22bd033d74da562fed7434b8a8bb292 /src/web/lib/image.php
parentupdate rss header (diff)
downloadwebsite-705edee6600d5d437cea5ab89fa008c748d4af11.tar.gz
website-705edee6600d5d437cea5ab89fa008c748d4af11.tar.bz2
website-705edee6600d5d437cea5ab89fa008c748d4af11.zip
fix redudant title text, make 'here' links more descriptive
Diffstat (limited to 'src/web/lib/image.php')
-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;