protected function checkDimensions($iWidth, $iHeight)
    {
        $oCdn = Factory::service('Cdn', 'nails/module-cdn');
        if (!$oCdn->isPermittedDimension($iWidth, $iHeight)) {
            if (Environment::not(Environment::ENV_PROD)) {
                throw new PermittedDimensionException(
                    'Transformation of image to ' . $iWidth . 'x' . $iHeight . ' is not permitted'
                );
            } else {
                show404();
            }
        }
    }