Skip to content

Commit 39d573b

Browse files
committed
patch: image crop new sizes
1 parent 0c45ef5 commit 39d573b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Traits/Attachments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ protected function updateSingleAttachment(&$att, $a_fields, &$a_single_errors)
429429

430430
// Resize and save image
431431
$img->crop(intval($coords[2]-$coords[0]), intval($coords[3]-$coords[1]), intval($coords[0]), intval($coords[1]))->save($new_file_path);
432+
$att->image_sizes = $img->width()."x".$img->height();
432433

433434
// Create new thumbnail
434435
$this->makeThumbnailFromImage($img, $new_filename);
@@ -444,7 +445,6 @@ protected function updateSingleAttachment(&$att, $a_fields, &$a_single_errors)
444445
$this->deleteThumbnail(basename($att->file_path));
445446

446447
// Updated fields
447-
$att->image_sizes = $img->width()."x".$img->height();
448448
$att->file_path = $new_file_path;
449449
}
450450
}

0 commit comments

Comments
 (0)