We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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:
new Image()
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
The text was updated successfully, but these errors were encountered:
Relative to what? Should we make an opinionated choice here and assume https? (I’d be on board with that)
https
Notably, new URL("//upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg") throws an error.
new URL("//upload.wikimedia.org/wikipedia/commons/f/fd/Ghostscript_Tiger.svg")
Sorry, something went wrong.
Yes, assuming https looks sensible and safer approach.
It got me thinking, should this be actually part of the elevent-img. Something that new URL() would not accept as valid?
elevent-img
new URL()
Can it be a separate utility or a plugin that people can use before eleventy-img?
eleventy-img
No branches or pull requests
The schema-relative or protocol relative URLs are common while porting old sites to Eleventy.
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
The text was updated successfully, but these errors were encountered: