Repository to store and serve assets.
All files in a GitHub repositories are served statically via raw.githubusercontent.com.
Files can be retrieved using HTTP GET against the corresponding URL endpoint.
The URL endpoint to retrieve a certain file can be computed using the following:
- The location of the desired file in the repository tree.
- The branch the file is in.
- Repository name.
- Organization.
The URL endpoint to retrieve a certain file can be obtained from GitHub web interface for file that can be viewed as raw.
Upload the file into the assets/ folder and push to the repository. Any branch will do. After the push the file is
served by GitHub.
You can either compute it or obtain it directly in the case of files that can be viewed as "raw". Images cannot be viewed as raw, they are downloaded directly, but the link that triggers the download is presumably the URL that we want to obtain.
We need the URL to the file that we want to serve from GitHub web interface. For example, for the file
./assets/code-urv-logo.png, its URL in GitHub web interface is:
https://github.com/CODE-URV/hosting/blob/master/assets/code-urv-logo.png
We can understand it as:
https://github.com/ORGANIZATION/REPO/blob/BRANCH/PATH/TO/FILE
To transform that URL into the URL that is statically serving the file we will apply this formula:
https://raw.githubusercontent.com/ORGANIZATION/REPO/refs/heads/BRANCH/PATH/TO/FILE
So, in the case of https://github.com/CODE-URV/hosting/blob/master/assets/code-urv-logo.png, its corresponding URL is https://raw.githubusercontent.com/CODE-URV/hosting/refs/heads/master/assets/code-urv-logo.png.
If you enter into a file in GitHub web interface and there is a raw button for that file, click it, and copy the URL.
That URL points statically to your desired file.
wget https://raw.githubusercontent.com/CODE-URV/hosting/refs/heads/master/assets/code-urv-logo.pngcurl https://raw.githubusercontent.com/CODE-URV/hosting/refs/heads/master/assets/code-urv-logo.pngWith this result:
<img src="https://raw.githubusercontent.com/CODE-URV/hosting/refs/heads/master/assets/code-urv-logo.png" alt="Logo CODE URV"/>With this result (same result as in Markdown section):
This is an open-source project, so any contributions are greatly appreciated ❤️.
If you have an issue or suggestion that would make hosting better, please
open a new issue explaining your inquiry. We will try to satisfy your
needs as soon as possible.
If you want to make a contribution to hosting by yourself, please
open a new issue, so we can discuss the reach of your contribution.
After that, fork the repo, implement your change and create a
pull request from your fork to the master branch. We will merge your
changes as soon as possible, so they are available in the next releases of hosting.
Do not forget to give the project a star ⭐ on GitHub!
Distributed under the GNU AFFERO GENERAL PUBLIC LICENSE, Version 3.
See LICENSE to obtain a copy of the therms of this license.
hosting ultimately belongs to Aleix Mariné-Tena and has the control over the licensing
and distribution therms.
Copyright 2025 Aleix Mariné-Tena
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
This software was developed with love ❤️ by Aleix Mariné-Tena for CODE URV to store and serve its logo and other possible assets.
- CODE URV: CODE URV, Association of Computer Scientists at the Rovira i Virgili University, mainly composed of students from the ETSE (School of Engineering).
- Aleix Mariné-Tena: Main developer of
simple-image-hosting, which was used to bootstrap this repository.

