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

Support for Schema-relative URL for remote images #235

Open
saneef opened this issue Jul 17, 2024 · 0 comments
Open

Support for Schema-relative URL for remote images #235

saneef opened this issue Jul 17, 2024 · 0 comments

Comments

@saneef
Copy link

saneef commented Jul 17, 2024

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

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