Streaming live at 10am (PST)

Lock Down Assets

Working on site that has some original art pieces. I’m exploring ways to keep the art from being dragged off the site. I used this script and it works but of course doesn’t prevent someone from inspecting the page and dragging the asset out of the file folder.

Any suggestions on how to handle this on a Webflow hosted site?

var makeUnselectable = function( $target ) {
.addClass( ‘unselectable’ ) // All these attributes are inheritable
.attr( ‘unselectable’, ‘on’ ) // For IE9 - This property is not inherited, needs to be placed onto everything
.attr( ‘draggable’, ‘false’ ) // For moz and webkit, although Firefox 16 ignores this when -moz-user-select: none; is set, it’s like these properties are mutually exclusive, seems to be a bug.
.on( ‘dragstart’, function() { return false; } ); // Needed since Firefox 16 seems to ingore the ‘draggable’ attribute we just applied above when ‘-moz-user-select: none’ is applied to the CSS

$target // Apply non-inheritable properties to the child elements
.find( ‘*’ )
.attr( ‘draggable’, ‘false’ )
.attr( ‘unselectable’, ‘on’ );

1 Like

Hi @jdesign, you are correct, the script solution (which may work on the visible presentation of the page), will not work if someone inspects the element of the page and just copies the image link.

At the moment, there is not a foolproof way to prevent a user from downloading the images :-/


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.