How can I change the background of the login page to an image in version 5.9?

Oarroyave6 months ago

Hello, I need to change the background image of the login screen. Is it possible in version 5.9?

Anton Tananaev6 months ago

There's no image there to change. You mean add?

Oarroyave6 months ago

Understood, I want to add an image

Oarroyave5 months ago

How can I add the background of the login page to an image in version 5.9?

Cristian5 months ago

import the image to use

import Image from '../resources/images/fondo-gps.jpg';

add these lines in the sidebar part: {

    backgroundImage: `url(${Image})`,
    backgroundSize: 'cover',
    height: '100vh',

this is the section
https://github.com/traccar/traccar-web/blob/master/modern/src/login/LoginLayout.jsx#L12

I have other changes in the login, but with what I indicate you can start, maybe a case you should work in the paper section https://github.com/traccar/traccar-web/blob/master/modern/src/login/LoginLayout.jsx#L26

my result is as follows
https://ibb.co/FY1fCLV

If you have any doubt you can ask again

Oarroyave5 months ago

Cristian Thank you very much for the timely response. I thought the change was made in a CSS file. After making this change in the code, does it need to be recompiled?

Cristian5 months ago