Image Path for Custom Tonies

I’m trying to play with the custom tonie feature and to get an image displayed. The current (WIP) modal (“Create new Custom Tonie/Tag”) is asking for a “Url to picture”. How is that supposed to look like? A file path to the image? An URL to a local file?
Is there a plan to store files on the server that can be served to the browser? Shall I be able to upload files via the browser, to be stored on the server and used as image? Or do the images need to be hosted somewhere outside of teddy cloud?

This could be any url you can reach with your browser. Could be a url to an image in the www or one hosted locally.

There is the idea (and an open issue) that you can also upload images to tc using the gui.

Sorry for reviving such an old topic…

Until said idea is implemented, where would I put my custom images if I want them to be hosted within teddycloud?

In the current develop branch is a new volume introduced (see docker-compose.yaml). If you have this volume /www/custom_img/ added, you can store the images within that folder and link the images in the tonies.custom.json „pic“: „/custom_img/yourImage.png“

I have added my music share as “NAS_Music”
Unfortunately I can’t access the covers - how do I have to enter this so that it works?

{
  "model": "Adya - Classic",
  "series": "Eigene",
  "pic": "NAS_Music/Alben, Sampler & Singles/Alben & Singles/Adya/Classic/Cover.jpg"
}

Where is this share located in teddycloud?

It must be part of the www folder to be usable (that’s not the case if I read it right in the other thread → so it’s not working as you like)

So why did you completely ignored my hint with the custom_img folder? Do it like that (you can map your path to the custom_img folder, but the target should stay the same as in the example docker)

You might also add a leading /

Ah, now I understand what you mean - I have adapted my Docker Create Script.

docker create \
--name=teddycloud \
--hostname=teddycloud \
--net=macvlan \
--ip 192.168.178.170 \
--restart unless-stopped \
-e TZ=Europe/Berlin \
-v /volume1/docker/teddycloud/certs:/teddycloud/certs \
-v /volume1/docker/teddycloud/config:/teddycloud/config \
-v /volume1/docker/teddycloud/content:/teddycloud/data/content \
-v /volume1/docker/teddycloud/library:/teddycloud/data/library \
-v /volume1/docker/teddycloud/firmware:/teddycloud/data/firmware \
-v /volume1/docker/teddycloud/cache:/teddycloud/data/cache \
-v /volume1/music:/teddycloud/data/www/custom_img:ro \
ghcr.io/toniebox-reverse-engineering/teddycloud:latest

And in my tonies.custom.json it now says this.

[
{
  "model": "Adya - Classic",
  "series": "Eigene",
  "pic": "/custom_img/Alben, Sampler & Singles/Alben & Singles/Adya/Classic/Cover.jpg"
}
]

But unfortunately I still get this error message.

INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 151
INFO |web.c:0152:web_download| Downloading file from '/custom_img/Alben, Sampler & Singles/Alben & Singles/Adya/Classic/Cover.jpg' into local file '/teddycloud/data/cache/B8BEF05ADEBABFE03B9C56E88C08E4DC19D9DD9BED3AF1B2E847CFDBFF5014B3.jpg'
ERROR|web.c:0040:web_parse_url| Unknown protocol
ERROR|web.c:0162:web_download| Failed to parse URL

Is it possible that the function is not yet included in the Docker image ghcr.io/toniebox-reverse-engineering/teddycloud:latest?
But when I use the image ghcr.io/toniebox-reverse-engineering/teddycloud:develop_debian, the error is still there. Then that won’t be the problem - will it?

i assume the spac, & and so on are not valid in this context.

I have now copied the JPG directly into the base path, same problem.

INFO |toniesJson.c:0280:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 97
INFO |web.c:0152:web_download| Downloading file from '/custom_img/Cover.jpg' into local file '/teddycloud/data/cache/588EDC919F09367FDD69550AA1AE15379CB9A6C0C4501C0E69C649234CE42201.jpg'
ERROR|web.c:0040:web_parse_url| Unknown protocol
ERROR|web.c:0162:web_download| Failed to parse URL

Can you open http://ip/custom_img/Cover.jpg ?

Yes
grafik

Can you disable the image cache thing?

Done.
No Error and I can use it.

So the problem is the caching?

Seem so.

Can you check all entries in your tonies.custom.json? Maybe another one is the problem.

You might open an issue in GitHub.

I have only this entry :wink:
This is the issue in GitHub
Can you close the thread?