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

Support of multiple image dirs and sources #3

Open
dev7ch opened this issue Aug 27, 2018 · 4 comments
Open

Support of multiple image dirs and sources #3

dev7ch opened this issue Aug 27, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@dev7ch
Copy link

dev7ch commented Aug 27, 2018

If i would use a lot of images it could be useful to define different independent source of images.

Or you could dream of array of an object with images (e.g. image collection from CDN)

@barryrld what do you think about this thoughts?

@dev7ch
Copy link
Author

dev7ch commented Aug 27, 2018

maybe something like this

['@reallifedigital/nuxt-image-loader-module', {  
      imagesBaseDir: ['static/uploads', '../outside-of-Project/', 'https://api.yourimageserver.com'],  
      imageStyles: {  
        thumbnail: { actions: ['gravity|Center', 'resize|320|180^', 'extent|320|180|+0|+90'] }  
        // ...  
      },  
    }]  
]

@Barry-Fisher
Copy link
Contributor

Good idea.

I was also thinking that the destination directory (e.g. image-styles) should be configurable, but this may not be necessary.

As for the remote retrieval of images, I'll need to give this some thought. I'll mark this as an enhancement for now.

Thanks,

Barry

@Barry-Fisher Barry-Fisher added the enhancement New feature or request label Aug 28, 2018
@adamkhan
Copy link

adamkhan commented Sep 9, 2018

Thanks for making and releasing this. I'm hunting around for a way to do this for images brought into Nuxt via Apollo from the site's content store (Strapi). I presume you've pulled this off? What is the approach? All I can think of is to maybe after the Apollo call write the files to a Nuxt directory then process the images? Looks like the suggestion in this thread would do the trick as well?

@dev7ch
Copy link
Author

dev7ch commented Sep 10, 2018

@adamkhan i am not sure but i assume if u use strapi in a running node.js server env that would be the ideal place where the image library resize, crop etc is done to have the correct images directly in apollo.

But yes the initial idea of the suggestion was to pull it from somewhere store it locally and put only the needed files into nuxt (or where it is needed)

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

No branches or pull requests

3 participants