Skip to content

Commit ef8e5cc

Browse files
fix(post): Added base64 section
1 parent 73297f5 commit ef8e5cc

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

_posts/2025-07-11-truenas-docker-pro.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,59 @@ volumes:
353353

354354
This makes `/ix-apps` accessible from inside Code Server, so you can quickly edit metadata, YAML, or other settings.
355355

356+
## Bonus: Embed Icons with Base64 (No Internet Needed)
357+
358+
If you're customizing app metadata on **TrueNAS SCALE**, you can embed an image **directly** using a Base64-encoded **Data URL**. This is perfect if you don’t want your system to rely on the internet just to load icons.
359+
360+
> *This method was originally shared in this excellent TrueNAS forum thread: [How to change icon of custom app](https://forums.truenas.com/t/how-to-change-icon-of-custom-app/24789/25?page=2)*
361+
{: .prompt-info }
362+
363+
---
364+
365+
### Option 1: Encode via Command Line (JPEG Example)
366+
367+
**Linux:**
368+
369+
```shell
370+
base64 -w 0 your-image.jpg > output.txt
371+
```
372+
373+
**macOS:**
374+
375+
```shell
376+
base64 your-image.jpg > output.txt
377+
```
378+
379+
Then embed it into your app's metadata like this:
380+
381+
```yaml
382+
icon: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...'
383+
```
384+
385+
> Replace `...` with the full Base64 string from `output.txt`
386+
387+
---
388+
389+
### Option 2: Use a Web Tool
390+
391+
Use [**base64.guru/converter/encode/image**](https://base64.guru/converter/encode/image)
392+
393+
- Upload your image (JPEG/PNG/etc.)
394+
- Choose **“Data URI”** as the output format
395+
- Copy the full result into your app’s metadata:
396+
397+
```yaml
398+
icon: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD...'
399+
```
400+
401+
---
402+
403+
### Why This Is Useful
404+
405+
- Keeps apps fully **offline-capable**
406+
- Avoids pulling icons from GitHub, Docker Hub, or external URLs
407+
- Ideal for **self-contained deployments** on isolated or air-gapped TrueNAS SCALE systems
408+
356409
---
357410

358411
## Join the conversation

0 commit comments

Comments
 (0)