spacecatninja / craft-imager-x-do-spaces-driver

External storage driver for Imager X that integrates with DigitalOcean Spaces
MIT License
2 stars 1 forks source link

Remote transformed images still saved locally #4

Closed russback closed 1 week ago

russback commented 1 week ago

Using this config for imager-x pro 5.0.0:

'*' => [
        'cacheEnabled' => false,
        'cacheRemoteFiles' => false,
        'allowUpscale' => false,
        'jpegQuality' => 95,
        'webpQuality' => 95,
        /**
         * Enabled optimisers
         * (Need to be installed on the server)
         */
        'optimizers' => [
            'jpegtran',
            'optipng',
            'gifsicle'
        ],

        /**
         * DO spaces storage 
         * https://github.com/spacecatninja/craft-imager-x-do-spaces-driver/blob/master/README.md
         */
        'imagerUrl' => App::env('SPACES_URL') . '/transforms/',
        'storages' => ['dospaces'],
        'storageConfig' => [
            'dospaces' => [
                'endpoint' => App::env('SPACES_ENDPOINT'),
                'accessKey' => App::env('SPACES_ACCESS_KEY'),
                'secretAccessKey' => App::env('SPACES_SECRET_KEY'),
                'region' => App::env('SPACES_REGION'),
                'bucket' => App::env('SPACES_BUCKET'),
                'folder' => 'transforms',
                'requestHeaders' => array(),
            ]
        ],

        'useForNativeTransforms' => true,
        'useForCpThumbs' => true,
    ],

The path to the images in the template are using the remote imagerUrl above fine, but the same images are still saved locally on the server.

This is fine from a bandwidth and CDN point of view, but does affect file storage on large sites with a lot of images and transforms going on.

Is this the expected behaviour?

aelvan commented 1 week ago

Hi,

Yes, this is the expected behaviour (see the FAQ), Imager is optimized for speed, not storage.