Quantcast
Channel: WordPress.org Forums » [WooCommerce] Support
Viewing all articles
Browse latest Browse all 102102

audiomuse on "[Plugin: WooCommerce - excelling eCommerce] Ways to prevent downloading of product images"

$
0
0

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 all articles
Browse latest Browse all 102102

Trending Articles