Always show small preview pictures, not the big ones

This commit is contained in:
Michael 2017-11-25 10:07:49 +00:00
parent 34e808e912
commit 4ddcc77c77
2 changed files with 3 additions and 1 deletions

View file

@ -207,7 +207,8 @@ function add_page_info_data($data) {
$preview = str_replace(array("[", "]"), array("[", "]"), htmlentities($data["images"][0]["src"], ENT_QUOTES, 'UTF-8', false));
// if the preview picture is larger than 500 pixels then show it in a larger mode
// But only, if the picture isn't higher than large (To prevent huge posts)
if (($data["images"][0]["width"] >= 500) && ($data["images"][0]["width"] >= $data["images"][0]["height"])) {
if (!Config::get('system', 'always_show_preview') && ($data["images"][0]["width"] >= 500)
&& ($data["images"][0]["width"] >= $data["images"][0]["height"])) {
$text .= " image='".$preview."'";
} else {
$text .= " preview='".$preview."'";