Question:

How to code a picture so it cant be saved or downloaded?

by  |  earlier

0 LIKES UnLike

anyone know how to code a picture so when someone trys to save it or click it or download it it will not save they will get like an error message?

 Tags:

   Report

3 ANSWERS


  1. Its impossible. You can disable right-click but that is pointless as when the user downloads the web page all of the images will be saved to their hard disk thus meaning they will already have them on their computer.

    Also people could just do a print screen of the image and then cut the image out into a file of its own.


  2. I think he's talking about actually hotlinking directly to the image itself.

    In that case there's 2 options.

    #1: Normally your server app will have an option somewhere to prevent image leeching.

    #2: Save it as a PHP file with the following code:

    <?php

    $referer='http://www.yoursite.com/';

    if(!substr_count($_SERVER['HTTP_REFERE... die;

    echo base64_decode(/*BASE64_ENCODE()D IMAGE FILE CONTENTS HERE*/);

    ?>

  3. it seems impossible i don't know an image format that will prevent itself from being copied or downloaded

    and yeah like the other guy said you could always Print-Screen the picture  

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.