Skip to content

Support for Schema-relative URL for remote images #235

Open
@saneef

Description

@saneef

The schema-relative or protocol relative URLs are common while porting old sites to Eleventy.

<img
  alt="A head of a tiger"
  src="//upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg"
>

Presently, when using such URL, new Image() gives the error:

Error: ENOENT: no such file or directory, stat '//upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg'

Is adding support for schema-relative URLs useful for our users?

See: saneef/eleventy-plugin-img2picture#27

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions