protected function getDimension($key)
    {
        $index      = array_search($key, ['height', 'width']);
        $dimensions = $this->getDimensions();

        return (!empty($dimensions[$index])) ? $dimensions[$index] : null;
    }