Support

Account

Home Forums General Issues Img-URL for background-image brings number

Solved

Img-URL for background-image brings number

  • Hello,

    I already read 3 similar threads, but the suggested solutions didn’t work.

    I have template and want to call an image as background-image in an inline style.
    I tried this
    style="background-image: url(<?php echo get_field('my-image'); ?>);"

    But it brings me a number… like “url(337)”

    Can anybody help please?

  • Hi @fantasmo

    If you want to do it with that code, please make sure that you have set the Return Value to “Image URL”. I’ve attached a screenshot for your reference.

    If that doesn’t help, it’s possible that there’s a conflict on your site. Could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.

    Thanks 🙂

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

The topic ‘Img-URL for background-image brings number’ is closed to new replies.