• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Complete image protection?? ?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Complete image protection?? ?

This topic is: resolved

Tagged: background, image, protect, protection

  • This topic has 3 replies, 2 voices, and was last updated 5 years, 8 months ago by Victor Font.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • July 6, 2017 at 2:47 am #208755
    Matus
    Member

    Hello 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.sk
    July 6, 2017 at 3:19 am #208756
    Victor Font
    Moderator

    The 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 #208777
    Matus
    Member

    Thanks, 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/5kqn

    However, 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 #208790
    Victor Font
    Moderator

    For 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?

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble