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

Could not optimize image (TypeError: Only absolute URLs are supported) #108

Open
aredean opened this issue Jan 5, 2022 · 0 comments
Open

Comments

@aredean
Copy link

aredean commented Jan 5, 2022

Hi,

I have some errors when trying to use image optimization, even I have already created process.env.
Image optimization always using my local path.

This is my plugin settings.

eleventyConfig.addPlugin(ampPlugin, {
      ampRuntimeHost:
        process.env.ENV === 'prod' ? 'https://mydomain.com' : 'http://localhost:8080',
      imageOptimization: true,
      validation: false,
    });

The error :

AMP Img Optimization WARNING Could not optimize image ({{ my local path }}\assets\{{ myfilename }}.png, 820w): TypeError: Only absolute URLs are supported

Is any wrong with the setup?

Thank you

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

1 participant