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

Loading external images #7

Closed
Casperhr opened this issue Oct 27, 2017 · 2 comments
Closed

Loading external images #7

Casperhr opened this issue Oct 27, 2017 · 2 comments

Comments

@Casperhr
Copy link

let url = "https://i.ytimg.com/vi/t34kH5eOVhM/maxresdefault.jpg"
        guard let image = Image(url: URL(fileURLWithPath: url)) else {
            print(url + " could not be loaded")
            return
        }
        print("OK")

Will result in "could not be loaded"

Internal images work just fine, is there a way to load external?
Or load them via bytes?

@mRs-
Copy link

mRs- commented Dec 12, 2017

Didn't know at all the project. IMHO it would be better to handle this via URLSession to fetch the image.

@twostraws
Copy link
Owner

As @mRs- said this is probably better handled by other frameworks.

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

3 participants