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

Oarroyavea year ago

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

Anton Tananaeva year ago

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

Oarroyavea year ago

Understood, I want to add an image

Oarroyavea year ago

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

Cristiana year 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

Oarroyavea year 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?

Cristiana year ago