Background images mobile / desktop

  • Hi,

    Probably a very simple question and even simpeler answer?
    I search everywhere but couldn’t find an answer.

    I have a container with background image.
    On mobile I want to change that image and position.
    So far so good.

    But is there a way to stop loading both images?
    Both are loaded and css is executed according to the device.

    Alternative:
    I would use the same image but different position.
    How can I do that?

    Regards,
    Jan

  • If you select a different background image on mobile and change the position value, the desktop image is not going to load. You might see it in the Inspector as on being loaded but will have a strike-through effect on it.

    Strike-through effect on Inspector

    Also, if you switch to mobile on the browser inspector and switch to the Network tab, you will see that indeed the desktop image is not being loaded at all in the list of files.

  • Hi,

    Thanks for clarifying this.
    Looks like my caching plugin messed things up with critical css loading.
    That’s why it looked like loading both images.

    I went back to one image and extra css for mobile, where the position of the image is changed.

  • Ok, no problem!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.