private function updateSize(Version $fv, ImageInterface $image)
    {
        $result = false;
        try {
            $size = $image->getSize();
        } catch (Exception $x) {
            $size = null;
        } catch (Throwable $x) {
            $size = null;
        }
        if ($size !== null) {
            $attributeCategory = $fv->getObjectAttributeCategory();
            $atWidth = $attributeCategory->getAttributeKeyByHandle('width');
            if ($atWidth !== null) {
                $fv->setAttribute($atWidth, $size->getWidth());
            }
            $atHeight = $attributeCategory->getAttributeKeyByHandle('height');
            if ($atHeight !== null) {
                $fv->setAttribute($atHeight, $size->getHeight());
            }
            $result = true;
        }

        return $result;
    }