# Rework loading images from files \(\#7088\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/2980f0508c5e2d5190a2506d888f55994d0ef793)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 2980f0508c5e2d5190a2506d888f55994d0ef793

Requested commit: 2980f0508c5e2d5190a2506d888f55994d0ef793

Commit: 2980f0508c5e2d5190a2506d888f55994d0ef793

Tree: 49612b2ce32180cbd319857b581f411021fc91af

Author: Marshall Bowers

Committer: GitHub

## Message

```
Rework loading images from files (#7088)

This PR is a follow-up to #7084, where I noted that I wasn't satisfied
with using `SharedUri` to represent both URIs and paths on the local
filesystem:

> I'm still not entirely happy with this naming, as the file paths that
we can store in here are not _really_ URIs, as they are lacking a
protocol.
>
> I want to explore changing `SharedUri` / `SharedUrl` back to alway
storing a URL and treat local filepaths differently, as it seems we're
conflating two different concerns under the same umbrella, at the
moment.

`SharedUri` has now been reverted to just containing a `SharedString`
with a URI.

`ImageSource` now has a new `File` variant that is used to load an image
from a `PathBuf`.

Release Notes:

- N/A
```

## Parents

- [6d4fe8098b8fc17f7cd92fb5c9f8fb3ee0c29da7](https://git.cafe/gitcafe/zed/commit/6d4fe8098b8fc17f7cd92fb5c9f8fb3ee0c29da7?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/2980f0508c5e2d5190a2506d888f55994d0ef793?format=markdown)
