protected function registerResolver()
    {
        $config = $this->app['config'];

        $this->app->singleton('Thapp\JitImage\ResolverInterface', 'Thapp\JitImage\JitImageResolver');

        $this->app->bind(
            'Thapp\JitImage\ResolverConfigInterface',
            function () use ($config) {

                $conf = [
                    'trusted_sites' => $config->get('jitimage::trusted-sites', []),
                    'cache_prefix'  => $config->get('jitimage::cache.prefix', 'jit_'),
                    'base_route'    => $config->get('jitimage::route', 'images'),
                    'cache_route'   => $config->get('jitimage::cache.route', 'jit/storage'),
                    'base'          => $config->get('jitimage::base', public_path()),
                    'cache'         => in_array(
                        $config->getEnvironment(),
                        $config->get('jitimage::cache.environments', [])
                    ),
                    'format_filter'  => $config->get('jitimage::filter.Convert', 'conv')
                ];
                return new \Thapp\JitImage\JitResolveConfiguration($conf);
            }
        );
    }