This is most likely due to differences in how the slider is structured online. Instead of replacing the line with an image, you could set the line color to None
(so that the line is invisible) and then have the image as an Image component behind it? So long as you line up the sizes it should have the same effect - I believe the width calculation would be:
mySlider.size[0] / len(mySlider.labels) * (len(mySlider.labels) - 1)
(replace mySlider
with the name of your slider)