Community Forums › Forums › Archived Forums › Design Tips and Tricks › Complete image protection?? ?
Tagged: background, image, protect, protection
- This topic has 3 replies, 2 voices, and was last updated 8 years, 4 months ago by
Victor Font.
-
AuthorPosts
-
July 6, 2017 at 2:47 am #208755
Matus
MemberHello everybody,
I was wondering how to get the same result: https://akouspesne.sk/cr8l
Look at the images specifically. There're using background-image CSS function.
You can't save, drag & drop or open images in new tab.How can I get the same result in WordPress powered website?
I'm using default Genesis Sample theme.Of course I can use for example this code to prevent dragging images:
img { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; }Or some other plugin such as this: https://akouspesne.sk/pc9v
Or disable right-click. But this isn't the right solution for me.Is there any way how to make all images on the website (including featured images and images in posts) behave like background images??
I appreciate any help.
P.S. my website (akouspesne.sk) is currently in maintenance mode
https://akouspesne.skJuly 6, 2017 at 3:19 am #208756Victor Font
ModeratorThe website you offer as the examplar is not protecting their images. In Firefox I can view the background image and save it. Without disabling right click, there isn't much you can do. This article expresses prevailing thought: https://graphpaperpress.com/blog/protect-website-image-stealing/
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?July 6, 2017 at 8:11 am #208777Matus
MemberThanks, but I'm looking for some more advanced solution.
I found this article, which explains how to make featured images be outputted into div background images. It would be nice if I could output also images in posts the same way.
Here's a link: https://akouspesne.sk/5kqnHowever, I don't know how to insert that code into my WP site. For example this one:
<?php $img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "full"); $img = $img[0]; ?> <div class="postimg" style="<?php if($img){echo 'background:url('.$img.');';} ?>"> </div>Any suggestions? Or do I have a wrong code?
July 6, 2017 at 1:51 pm #208790Victor Font
ModeratorFor the featured image, you would have to replace genesis_do_post_image with your own function.
For posts, you would enter the div and background image directly.
I hope you understand that as long as right click is enabled, even background images are accessible and downloadable. Going through all of that work to make background images will provide no additional security.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet? -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.