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

how to point URL to an s3 bucket after generation? #17

Open
simonhrogers opened this issue Feb 6, 2019 · 2 comments
Open

how to point URL to an s3 bucket after generation? #17

simonhrogers opened this issue Feb 6, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@simonhrogers
Copy link

Hello! Thanks very much for your work on this module, it is brilliant.

Can you point me in the right direction? I am looking for a way to point the URL to my s3 bucket e.g. https://s3.eu-west-2.amazonaws.com/assets.my-website.org/slides after statically generating my site.

Previously I was adding the string: https://s3.eu-west-2.amazonaws.com/assets.my-website.org/slides through a computed property in my code.

This method no longer works because this prevents nuxt-image-loader-module from finding the images and correctly generating my application. I need a way of pointing all image URLs to my s3 after this has been done.

How can I do this? What is the standard approach for this?

Many Thanks,

Simon

@Barry-Fisher
Copy link
Contributor

Hi Simon,

Thanks for raising this issue and for your kind words.

S3 integration isn't something that I've tested so far. I can add this to the roadmap for this plugin, although I can't immediately put my attention on this due to busy work commitments.

I think S3 integration would be a worthy addition and as you have a real use case, I'd like to ask you a few questions so that I understand what you're trying to achieve.

Are you trying to:

  • Put your entire compiled nuxt app on S3 and host from there
  • Retrieve existing source images from an S3 bucket?
  • Point the compiled <img> sources to a remote S3 bucket where the compiled images live?
  • Is you S3 bucket publicly accessible - i.e. no access permissions set?

I'd like to see if there is a general solution that's not necessarily S3 specific so this module can support other image hosting solutions.

Thanks,

Barry

@Barry-Fisher Barry-Fisher added the enhancement New feature or request label Feb 7, 2019
@simonhrogers
Copy link
Author

Thanks Barry!

I’m not well versed in best practices for asset storage – so I was posing a question about how would be best to handle this as much as anything.

I am hosting my app from Netlify currently, and had thought it would be nice to store all image assets on a separate s3 bucket, attached to a subdomain e.g. assets.my-domain.com

Given this idea, I had thought it would be nice if during the build / generation process, assets could be generated and then uploaded to this bucket – with links amended appropriately.

With this in mind, I think my objective is as you describe in your third point:

  • Point the compiled <img> sources to a remote S3 bucket where the compiled images live?

The assets could certainly be made public if necessary or easier!

Thanks,

Simon

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

2 participants