This repository serves as a CDN (Content Delivery Network) for storing and deploying PNG and SVG image files. The images are organized in a specific folder structure, and you can access them through two different CDN URLs.
Modify the example link as needed
https://corecdn.info/mark/256/xcb.pngSource assets are SVG files in the base folder. A script generates multiple sizes in both SVG and PNG from these sources.
[badge|mark]/base/{name}.svg ← source (SVG only)
[badge|mark]/[size]/{name}.svg ← generated
[badge|mark]/[size]/{name}.png ← generated- badge/mark: Top-level directory for badge or mark images.
- base: Contains the source SVG files. Only SVGs live here; PNGs are generated.
- size: Generated output folders named by pixel size (see list below).
- {name}: The filename without extension.
The script produces icons at these pixel sizes (in both SVG and PNG):
16, 24, 32, 48, 64, 72, 96, 128, 144, 192, 256, 512, 1024
The script scripts/resize_icons.sh generates all size variants from the base SVGs:
- Finds every SVG under
badge/base/andmark/base/. - For each base SVG, creates a folder per size (e.g.
mark/256/) and:- Copies the SVG into that folder.
- Exports a PNG at that pixel size using Inkscape.
Requirements: Inkscape must be installed and on your PATH.
Run from the repo root:
./scripts/resize_icons.shAfter running, commit the updated badge/<size>/ and mark/<size>/ folders as needed.
You can access the image files through the following CDN URLs:
-
jsDelivr: You can access the files using the URL: https://cdn.jsdelivr.net/gh/bchainhub/corecdn/{path}. Replace
{path}with the path to the desired image file. -
corecdn.info: Alternatively, you can access the files using the URL: https://corecdn.info/{path}. Replace
{path}with the path to the specific image file.
To use the image files in your project, you can directly reference the URLs mentioned above. You can integrate these URLs into your web pages, apps, or any other platform that supports image rendering.
Here's an example of how you can use the CDN URLs in HTML:
<img src="https://cdn.jsdelivr.net/gh/bchainhub/corecdn/{path}" alt="Image Name">Replace {path} with the actual path to the image file you want to display.
Contributions to this project are welcome. If you have any suggestions, improvements, or bug fixes, please open an issue to discuss them first. For major changes, it is recommended to discuss them before implementing.
Please make sure to update any relevant tests when contributing to this project.
This software is licensed under the CORE License.