[Support request] GenerateBlocks container background image sets absolute URLs

Home Forums Support GenerateBlocks container background image sets absolute URLs

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1499515
    Michael

    Situation:
    I’m using three WordPress installs:
    1. a local “dev” site (on https://fmp.web),
    2. an online “staging” site (on https://fmp.*mysite*.net),
    3. and (soon) an online “live” site.

    These sites each have different domains (see brackets above) so I need to make moving code between them fairly straightforward. I’ve found on other sites that the WPVivid plugin works well, and provides backups too.

    Problem:
    WPVivid migrates my “dev” site to the “staging” site. Almost everything works, except where I’m using background images with GenerateBlocks containers. These are set with the full URL rather than an absolute path.
    (i.e. “//fmp.web/wp-content/uploads/2020/10/image.jpg” instead of “/wp-content/uploads/2020/10/image.jpg”

    Is there a way to make GenerateBlocks use relative paths from the root and leave out the domain?

    Pain point:
    I didn’t notice this at first, because the testing I do is from my laptop which is also the localhost server for the “dev” site. So, it happily served up the local dev images onto the staging site…!

    #1500186
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This isn’t possible, unfortunately.

    However, you can regenerate your CSS in Settings > GenerateBlocks once the migration is complete and all of those file URLs should update to match the current URL you have set.

    Let me know if that works or not 🙂

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