Remove encodePath from image viewer components
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=544634)
</details>
<!--IssueSummary end-->
The following discussion from !191377 should be addressed:
- [ ] @ms.mondrian started a [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/191377#note_2515629469): (+3 comments)
> **question (non-blocking):** to me, this is a smol code smell. like urls can be encoded or not encoded. i don't know the effort but is it a straightforward fix to get urls either encoded or not from backend instead?
We should remove `encodePath` since we already provide encoded path in Rapid Diffs.
issue