rust-lang / crates.io

The Rust package registry

Home Page:https://crates.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with Image source at https

richardmcatlin opened this issue · comments

Current Behavior

Trying to use https as source for Image. Works in SlintPad, but get compile error with cargo and wasm.

Expected Behavior

This works in SlintPad, but does not compile for cargo project.

export component Example inherits Window {
    in property <image> url1: @image-url("https://upload.wikimedia.org/wikipedia/commons/4/42/Berlin_potsdamer_platz.jpg");
    width: 200px;
    height: 150px;
    VerticalLayout {
        Image {
            source: url1;
            width: 200px;
            // implicit default, preserving aspect ratio:
            // height: self.width * natural_height / natural_width;
        }
    }
}

error: Cannot find image file https://upload.wikimedia.org/wikipedia/commons/4/42/Berlin_potsdamer_platz.jpg
--> /Users/rhettcatlin/Desktop/catlin/rust/rust_fullstack_on_aws_serverless/client_slint_puzzle/slide_puzzle.slint:112:31
|
112 | in property url1: @image-url("https://upload.wikimedia.org/wikipedia/commons/4/42/Berlin_potsdamer_platz.jpg");

Steps To Reproduce

No response

Environment

  • Browser:
  • OS:

Anything else?

No response

you might want to report this to the slint project (https://github.com/slint-ui/slint) instead of crates.io 😉