Skip to content

Commit 28166c7

Browse files
author
Sebastian Pfahl
committed
Also add title param
1 parent 7cebb53 commit 28166c7

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/Tmdb/Helper/ImageHelper.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ public function getImageConfiguration()
5757
* @param string $size
5858
* @param int|null $width
5959
* @param int|null $height
60-
* @param string $alt
60+
* @param string $title
6161
* @return string
6262
*/
63-
public function getHtml($image, $size = 'original', $width = null, $height = null, $alt = '')
63+
public function getHtml($image, $size = 'original', $width = null, $height = null, $title = '')
6464
{
6565
if ($image instanceof Image) {
6666
if (null == $image->getFilePath()) {
@@ -87,11 +87,12 @@ public function getHtml($image, $size = 'original', $width = null, $height = nul
8787
}
8888

8989
return sprintf(
90-
'<img src="%s" width="%s" height="%s" alt="%s"/>',
90+
'<img src="%s" width="%s" height="%s" title="%s" alt="%s"/>',
9191
$this->getUrl($image, $size),
9292
$width,
9393
$height,
94-
$alt
94+
$title,
95+
$title
9596
);
9697
}
9798

0 commit comments

Comments
 (0)