• Let me start by thanking you for the great plugin and continued efforts to solve issues!

    My problem is as follows: I am using ACF to add a background image to some elements via inline background-image definitions (so in essence image paths added via PHP). The Simply Static plugin is set to use a relative url /websitename/. Mind you this approach works when I generate a src path used in an IMG tag but when I print it to the inline background-image style it lacks the /websitename/ at the beginning of the url and starts with /wp-content/uploads/. The source images are present in the /uploads folder (the dynamic website works), the crawler does not fetch them at all and they are not present in the static files. Hope you can make some sense of this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Peter,

    Thanks for reporting this issue. I’ll investigate and see if I can get a fix out for you.

    Best,
    Scott

    Hi Peter,

    I tried this out and I was unable to recreate the issue. I set up a site to export relative paths with /dir/ as path base.
    Then I set up a page with an inline background-image like this:

    <div style="width: 600px; height: 400px; background-image: url('/wp-content/uploads/2016/01/Filtergr%C3%B6%C3%9Fen.jpg')"></div>

    And it was output like this:

    <div style="width: 600px; height: 400px; background-image: url('/dir/wp-content/uploads/2016/01/Filtergr%C3%B6%C3%9Fen.jpg')"></div>

    The image file was also present in the static files.

    Maybe you could share a bit more about what the HTML looked like? Or just show me the site you’re working with? You can also reach me at scott@codeofconduct.co if you don’t want to post it here.

    Best,
    Scott

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Inline background path issue when used with ACF’ is closed to new replies.