Replacing an Image

David Schure
David Schure used Ask the Experts™
I need to replace an URL image with a local image.
<div class="section_bg_image" style="background-image: url("></div>

Open in new window

How can this be done. Thank you.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fractional CTO
Distinguished Expert 2018
Can't be done.

Or rather, you can do anything you like + only you will see this image, as there's no way to directly serve a local image to public visitors.

To change this locally, replacing url(...) with url(file:///path-to-your-image.jpg) will work.

And again, only you will see local images. External visitors will see the browser specific broken image icon.


Thank you.
David FavorFractional CTO
Distinguished Expert 2018

You're welcome!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial