diff --git a/lam/lib/html.inc b/lam/lib/html.inc
index 12f0eebd..9e8a8815 100644
--- a/lam/lib/html.inc
+++ b/lam/lib/html.inc
@@ -2360,7 +2360,11 @@ class htmlImage extends htmlElement {
$height = ' height="' . $this->height . '"';
}
$alt = ' alt="' . $this->alt . '"';
- echo '\n";
+ $classes = '';
+ if (!empty($this->cssClasses)) {
+ $classes = 'class="' . implode(' ', $this->cssClasses) . '"';
+ }
+ echo '\n";
return array();
}
diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc
index b515eea9..7ac73192 100644
--- a/lam/lib/modules/inetOrgPerson.inc
+++ b/lam/lib/modules/inetOrgPerson.inc
@@ -1612,7 +1612,9 @@ class inetOrgPerson extends baseModule implements passwordService {
$photoFile = '../../tmp/' . $jpeg_filename;
$noPhoto = false;
}
- $imageContainer->addElement(new htmlImage($photoFile), true);
+ $img = new htmlImage($photoFile);
+ $img->setCSSClasses(array('photo'));
+ $imageContainer->addElement($img, true);
if (!$this->isAdminReadOnly('jpegPhoto')) {
if ($noPhoto) {
$imageContainer->addElement(new htmlAccountPageButton(get_class($this), 'photo', 'open', _('Add photo')));
@@ -2699,7 +2701,9 @@ class inetOrgPerson extends baseModule implements passwordService {
fclose ($outjpeg);
$photoFile = '../../tmp/' . $jpeg_filename;
$photoSub = new htmlTable();
- $photoSub->addElement(new htmlImage($photoFile), true);
+ $img = new htmlImage($photoFile);
+ $img->setCSSClasses(array('photo'));
+ $photoSub->addElement($img, true);
if (!in_array('jpegPhoto', $readOnlyFields)) {
$photoSubSub = new htmlTable();
$photoSubSub->addElement(new htmlTableExtendedInputCheckbox('removeReplacePhoto', false, _('Remove/replace photo'), null, false));
diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css
index ddc21612..04b07717 100644
--- a/lam/style/500_layout.css
+++ b/lam/style/500_layout.css
@@ -438,6 +438,11 @@ td.help {
font-size: 10pt;
}
+img.photo {
+ max-width: 200px;
+ max-height: 400px;
+}
+
/* schema browser */