Adding image v5.3

jay2 years ago

I am adding image, but image does not show. Upload jpg and png format still not showing. I also went to maps setting and highlighted image.

jay2 years ago

Adding to the above, I have a firewall enabled on ubuntu server and opened only ports I require. Also changed ssh port to a custom port. Will this have an effect for the images not to show or images not to change if changed.

ScaredyCat2 years ago

Have you checked the browser console and tracker-log file? Make sure the user you are using to run the server has read write acces to the media folder in the traccar folder.

jay2 years ago

See image after I add image. The console message.
https://drive.google.com/file/d/1Az1a4fS-5hgwkBfFQCHvWn_CnLdTWN6g/view?usp=sharing
I ssh into traccar media folder and image file is there. I made folder write and read as well. Still image not showing on map.

jay2 years ago
jay2 years ago
ScaredyCat2 years ago

The console is showing a 404 error (file not found):

So if you:

ls -la /opt/traccar/media

are the device folders there, are they owned by the user that runs traccar? and writable too? ( one for each device identifier) and if you look in those device identifier folders are threre any files png or jpg in there?

Are you running traccar as root or are you using run-as-user ?

jay2 years ago

I went to the media and device identifier folder and the image is there. Image.png. File permissiion writable and executable. Im running as root user.

Anton Tananaev2 years ago

It is expecting device.png, not image.png, as you can clearly see from the console.

jay2 years ago

Sorry my bad. Its shows image.png file name.

jay2 years ago

shows device.png in media folder. reinstalled v5.3 and still say in console 404 file not found. device.png is in the media/device id folder.
folder as read write access. running from root account. Is there a link I can use on the address to view the device.png.
I went to myip/media/device id/device.png but not displaying image.

ScaredyCat2 years ago

The url would be

<ip-address>/api/media/<device-id>/<filename>

so for your example it would be

myip/api/media/device id/device.png

(note the 'api' after the ip address)

jay2 years ago

Just an update.Image started to show now. Didnt make any changes

Marcin2 years ago

I had same. It was because of copying media folder from 5.2 to 5.3
But forget to own them to root again.
Even after i did i had to restart traccar server for changes taking effect.
Now all fine with 5.3
Grows better to best > Thanks Anton

Marcin2 years ago

Funny, same problem, googlet it > Found my own answer (restart traccar after su cp -r media /opt/traccar