Skip to content

Export inline background  #175

Description

@jimmy-work

Hello

Thanks for the plugin.

In my code I sometimes find myself needing to retrieve ACF fields to use inline style for image background in html. Here is an example:

<?php $background = get_field('background'); ?>
<?php $backgroundUrl = wp_get_attachment_image_src($background, 'full'); ?>
<div class="contact__background" style="background: url('<?php echo $backgroundUrl[0]; ?>') no-repeat center; background-size: 100%;"></div>

The client can put png or svg in the ideal. It's working well before the export.

The concern is that once the export is finished this type of field is empty like that:

<div class="contact__background" style="background: url('') no-repeat center; background-size: 100%;"></div>

Is this a bug?

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions