Images are called from CSS for a page made in Visual Composer.

I have added background images to the row in visual composer but they are not been indexed over the CDN. I see that the images are not called using img src but seem to be added in a CSS class and with background-image.

  • Patrick Freitas
    • FLS

    Hi Katarina

    Sorry to hear it isn’t working as expected.

    I can see there is a reported problem on images that not use the quotes on

    <p style="background-image: url(https://site.com/image.jpg);">

    I found a similar problem on your site, I checked some images on your website, and I can see for some of them which the page builder added the quotes are working fine, for example.

    [attachments are only viewable by logged-in members]

    But for some images, the plugin is adding the quote using HTML special characters. & quot;

    <div style="background-image: url("https://mysite.com/wp-content/uploads/2019/08/wpmudev.jpg"); ></div>

    On this way, the plugin is not serving the images on CDN, I was able to replicate this on my end and will be forwarding to developers, hope we can fix it soon.

    Let us know if you need any further help on this.

    Best Regards

    Patrick Freitas

  • Katarina
    • New Recruit

    Hello Patrick,

    Thank you for your feedback.

    Is this a problem with the Theme (Salient by Nektar) or WP Bakery Page Builder?

    Do you know if it happens on a particular style ie. image set as background?

    Do you think this can be fixed with a piece of code?

    I thank you for your help.

    Kind regards,

    Katarina

  • Tho Bui
    • SLS

    Hi Katarina,

    I added a temporary fix, by adding single quotations marks for background-image URL of these files: vc_row.php, vc_row_inner.php, vc_column.php, vc_column_inner.php (parent-theme/nectar/nectar-vc-addons/vc_templates/) . I will be forwarding to developers, hope we can fix it soon.

    Kind Regards,

    Tho Bui

  • Katarina
    • New Recruit

    Hello Tho Bui,

    Thank you for your help with this issue. I have been testing a few things as well and the problem appears on all background images. I know you analyzed the row background images but the problem also occurs with column background images.

    Thank you so much for all your help with this issue.

    Do you experience those issues with other themes and page builders too, or is this a Salient related issue?

    Thank you and my very best wishes,

    Katarina

  • Rupok
    • Ex Staff

    Hi Katarina,

    Thanks for the additional details of this problem. This is not specifically a Salient related issue. It’s about how the images are being added as Patrick mentioned above. However, our developer is already working on this. I believe he will come up with a solution very soon. We will update you here as soon as we get anything from him. I’ll request you to wait for a little more. I really appreciate your patience.

    Regards,

    Rupok

  • Katarina
    • New Recruit

    Hello Patrick,

    So this is not something that will happen in a couple of days then, I am afraid?

    I was under the impression that you and your dev team was working on a solution to help me with this particular case?

    Could you please let me know as the images not deferring makes up a big part of the ‘not so good’ performance in my speed tests.

    If it will take weeks to find a solution, I may have to consider re-designing certain parts of my website for the time being and to find a work-around.

    I appreciate if you could please let me know.

    Thank you and my best wishes,

    Katarina