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

assetPrefix #19

Closed
pmg1989 opened this issue May 2, 2018 · 2 comments
Closed

assetPrefix #19

pmg1989 opened this issue May 2, 2018 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@pmg1989
Copy link

pmg1989 commented May 2, 2018

how to config the assetPrefix?

@cyrilwanner
Copy link
Owner

This plugin has a separate config for that because some users will upload their images to a different service (e.g. S3) than all other assets. You can use the imagesPublicPath for that.

Example:

// next.config.js
const withOptimizedImages = require('next-optimized-images');

module.exports = withOptimizedImages({
  imagesPublicPath: 'https://my.cdn.com/_next/static/images/'
});

But as I'm now writing this, I think the normal assetPrefix should be supported by default and this setting should be an optional overwrite. I'll definitely include assetPrefix support it in the next version, until then, the imagesPublicPath can be used.

@cyrilwanner cyrilwanner added the enhancement New feature or request label May 2, 2018
@cyrilwanner cyrilwanner added this to the 2.0 milestone Jul 17, 2018
@cyrilwanner cyrilwanner mentioned this issue Nov 24, 2018
Merged
@cyrilwanner
Copy link
Owner

The assetPrefix is now supported out of the box with version 2 (which now has been released).

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