Forum Replies Created

Viewing 1 replies (of 1 total)
  • audiomuse

    (@audiomuse)

    How about writing a function that replaces the following:

    <img src="image.jpg" width="300px" height="400px" />

    with this:

    <div style="width: 300px; height: 400px; background: url('image.jpg');"></div>

    Then maybe you can call the function:

    <?php place_image( 'image.jpg' ); ?>

    To return the second code example.

    Technically, users can still download the image, but they’d have to inspect the code, and manually navigate to the image file. I came across this notion while trying to find ways to present photos in a responsive design.

Viewing 1 replies (of 1 total)