API PreviewThumbnail now uses ScaleMaxWidth

This will mean that if a thumbnail image is smaller than the preview_width defined, then it will no longer get blown up to the defined size.
This commit is contained in:
Christopher Joe 2016-09-13 12:03:36 +12:00 committed by Ingo Schommer
parent ee5b4fd8d3
commit 190ed628bc

View File

@ -486,7 +486,7 @@ trait ImageManipulation {
*/
public function PreviewThumbnail() {
$width = (int)Config::inst()->get(get_class($this), 'asset_preview_width');
return $this->ScaleWidth($width) ?: $this->IconTag();
return $this->ScaleMaxWidth($width) ?: $this->IconTag();
}
/**