Skip to content

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

Open
@aredean

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions