mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 04:20:55 +01:00
Fix bad aspect ratio on some file previews
Summary: Ref T7707. Fixes T4724. I misread the report on T4724; this is trivial. We're just reading the wrong properties in setting "width" and "height" attributes, the actual thumbnailing logic is fine. Test Plan: Uploaded image from T4724, saw it have a proper aspect ratio. Reviewers: btrahan, chad Reviewed By: chad Subscribers: spicyj, epriestley Maniphest Tasks: T4724, T7707 Differential Revision: https://secure.phabricator.com/D12810
This commit is contained in:
parent
65ff40844b
commit
a19b0029e2
1 changed files with 2 additions and 2 deletions
|
@ -110,8 +110,8 @@ final class PhabricatorEmbedFileRemarkupRule
|
|||
$attrs['src'] = $file->getPreview220URI();
|
||||
$dimensions =
|
||||
PhabricatorImageTransformer::getPreviewDimensions($file, 220);
|
||||
$attrs['width'] = $dimensions['sdx'];
|
||||
$attrs['height'] = $dimensions['sdy'];
|
||||
$attrs['width'] = $dimensions['dx'];
|
||||
$attrs['height'] = $dimensions['dy'];
|
||||
$image_class = 'phabricator-remarkup-embed-image';
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue