Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking for a way to use different volumes and one filesystem #17

Open
bart-honcho opened this issue Sep 19, 2024 · 2 comments
Open

Looking for a way to use different volumes and one filesystem #17

bart-honcho opened this issue Sep 19, 2024 · 2 comments

Comments

@bart-honcho
Copy link

Hi there,

I am looking to create one filesystem that points to the root of my digital ocean spaces folder and then have 3 different volumes each pointing to different folders ie Images, Videos & Files

I understand from this issue: #7, that you can add an array to the subfolder path in the config file and that will work, however that slightly defeats the point if I have to update the config each time I create a new site with a new volume

Screenshot 2024-09-19 at 16 11 37

Just wondering if there is a way for imgixer to map to the volume subpath?

Thank you

@croxton
Copy link
Owner

croxton commented Sep 20, 2024

The best way to do this is to define 3 filesystems and 3 corresponding asset volumes (for Images, Videos & Files) setting the Subfolder on the filesystem rather than specifying a Subpath on the volume. The filesystems can all use the same Base URL and point to the same external cloud storage.

Filesystem:

Screenshot 2024-09-20 at 17 18 55

Asset volume:

Screenshot 2024-09-20 at 17 17 09

@croxton
Copy link
Owner

croxton commented Sep 20, 2024

You would only need to define a single source to transform images in any of the three subfolders (or any future ones you might create). E.g.:

'imgix' => array(
    'provider' => 'imgix',
    'endpoint' => getenv('IMGIX_URL'),
    'privateKey' => getenv('IMGIX_KEY'),
    'signed' => true,
    'defaultParams' => array(
        'auto' => 'compress,format,enhance',
        'fit'  => 'crop',
        'crop' => 'focalpoint',
        'step' => '256',
        'q'    => '80'
    )
),  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants