Skip to content

Commit 21d9bfb

Browse files
authored
Update functions.image.php
Removed un-needed px markers from width and height markers since those are not in a style tag, they are not needed.
1 parent f999409 commit 21d9bfb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/functions.image.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ function newbbAttachmentImage($source)
7272
|| $imginfo[1] > $GLOBALS['xoopsModuleConfig']['max_image_height']) {
7373
$pseudo_width = $GLOBALS['xoopsModuleConfig']['max_image_width'];
7474
$pseudo_height = $GLOBALS['xoopsModuleConfig']['max_image_width'] * ($imginfo[1] / $imginfo[0]);
75-
$pseudo_size = "width='" . $pseudo_width . "px' height='" . $pseudo_height ."px'";
75+
$pseudo_size = "width='" . $pseudo_width . "' height='" . $pseudo_height ."'";
7676
}
7777
// irmtfan to fix Undefined variable: pseudo_height
7878
if (!empty($pseudo_height) && $GLOBALS['xoopsModuleConfig']['max_image_height'] > 0
7979
&& $pseudo_height > $GLOBALS['xoopsModuleConfig']['max_image_height']) {
8080
$pseudo_height = $GLOBALS['xoopsModuleConfig']['max_image_height'];
8181
$pseudo_width = $GLOBALS['xoopsModuleConfig']['max_image_height'] * ($imginfo[0] / $imginfo[1]);
82-
$pseudo_size = "width='" . $pseudo_width . "px' height='" . $pseudo_height ."px'";
82+
$pseudo_size = "width='" . $pseudo_width . "' height='" . $pseudo_height ."'";
8383
}
8484

8585
//BigKev73 Change to add max with property to properly scale photos
@@ -92,7 +92,7 @@ function newbbAttachmentImage($source)
9292
$attachmentImage .= '<img src="' . $image_url . '" ' . $pseudo_size . ' alt="' . $source . ' ' . $img_info . '" style="max-width: 100%; height: auto;">';
9393
$attachmentImage .= '</a>';
9494
} elseif (file_exists($image)) {
95-
$attachmentImage = '<img src="' . $image_url . '" alt="' . $source . ' ' . $img_info . '" width="' . $imginfo[0] . 'px" height="' . $imginfo[1] . 'px" style="max-width: 100%; height: auto;">';
95+
$attachmentImage = '<img src="' . $image_url . '" alt="' . $source . ' ' . $img_info . '" width="' . $imginfo[0] . '" height="' . $imginfo[1] . '" style="max-width: 100%; height: auto;">';
9696
} else {
9797
$attachmentImage = '';
9898
}

0 commit comments

Comments
 (0)