Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update...
Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update the file size in file_validate_image_resolution after resizing
(cherry picked from commit 1a3d72bc)
(cherry picked from commit 2340e939)
@@ -295,6 +295,8 @@ function file_validate_image_resolution(FileInterface $file, $maximum_dimensions
if($image->scale($width,$height)){
$scaling=TRUE;
$image->save();
// Update the file size now that the image has been resized.
$file->setSize($image->getFileSize());
if(!empty($width)&&!empty($height)){
$message=t('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels. The new dimensions of the resized image are %new_widthx%new_height pixels.',