protected function getDimensions(UploadedFileInterface $upload)
    {
        $dimension = getimagesize($upload->getStream()->getMetadata('uri'));

        return [
            'width'  => $dimension[ 0 ],
            'height' => $dimension[ 1 ]
        ];
    }