How to create a background image on a web-page that cannot be copied

Question

I just stumbled upon this github help page- https://guides.github.com/activities/hello-world/

On this page, the background image on which the title is written cannot be copied and saved. The browser does not recognize it as an image. I want to know how it is possible to create an image on a webpage that cannot be copied by the user.

Also, is it possible that it's not an image but a graphic created by some code in javascript or some other language?


Show source
| javascript   | html   | css   | background-image   2017-01-03 09:01 8 Answers

Answers ( 8 )

  1. 2017-01-03 09:01

    The header image in the link is generated from a BASE64 Encoded image string in its CSS. Any modern browser can understand this type of image and parse it. In this case the image is an encoded SVG (Scalable Vector Graphics) image, but it could also be a JPEG, PNG, GIF or BMP image.

    In the source you will see a div with a background image that looks like a very long garbled string:

    <div style="background-image: url(data:image/svg+xml;base64, BASE64-ENCODED-IMAGE-STRING">
    

    (replace BASE64-ENCODED-IMAGE-STRING with the original one from the page source)

    On this website for example, you can generate a BASE64 encoded image string.

    However, this does NOT mean that the image cannot be saved or copied by a user!

    Using this website, for example, you can decode the image in a form that an end user can save/copy: http://freeonlinetools24.com/base64-image.

    as @aavrug pointed out below, this can also be done using the developer's tools in any browser.

    as other users pointed out, some browser do give the option to save the background image when using right mouse click

    As @Viktor Mellgren points out: Also, there is always screenshot

    Conclusion

    Once an image is in the browser, it can be saved by an end user. To better protect your images, look at Watermarking them using specialized tools or scripts:

  2. 2017-01-03 10:01

    All images can be saved:

    enter image description here

    You can convert image to base64 string as another answers says, but is still can be saved and copied.

    And how?

    Just copy image string here http://codebeautify.org/base64-to-image-converter and you will get downloadable image.

  3. 2017-01-03 10:01

    Every image send to the browser, can be copied, one way or the other. You can make it harder for non-tech-savy people by disabling right-click oncontextmenu and mouse drag ondrag. This will prevent the user on right-clicking the image and saving it, and dragging it to the desktop.

    But, as I said, and many others are saying too, is that it will always be possible to download the info that is send to the browser - one way or the other.

  4. 2017-01-03 10:01

    Well, that's base64 encoded image string: try it here at: b64.io When I dropped the image in question to this site, I got this:

    /* file size: 3.2ko | already optimized | base64 size: 4.2ko */
    .index {
        background-image: url(data:image/svg+xml;base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jdCB4PSI0MzEiIHk9IjAiIHdpZHRoPSI5IiBoZWlnaHQ9IjEwMCUiIG9wYWNpdHk9IjAuMDU0NjY2NjY2NjY2NjY2NjciIGZpbGw9IiNkZGQiLz48L3N2Zz4=);
    }
    

    Well, I am able to view the image and save it to disk as well, without any issue (from the github link that you mentioned). I am not sure if it is working for me due to some Firefox plugin, or it simply works with Firefox.

    When I right click on background image, I see option "View Background Image and when I view the image I see this:

    data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0NDAiIGhlaWdodD0iNDQwIj48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJyZ2IoMTI3LCA1NCwgNjApIiAgLz48cmVjdCB4PSIwIiB5PSI1IiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxNSIgb3BhY2l0eT0iMC4xMDY2NjY2NjY2NjY2NjY2NyIgZmlsbD0iI2RkZCIgIC8+PHJlY3QgeD0iMCIgeT0iMjkiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjE4IiBvcGFjaXR5PSIwLjEzMjY2NjY2NjY2NjY2NjY1IiBmaWxsPSIjMjIyIiAgLz48cmVjdCB4PSIwIiB5PSI1NyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAiIG9wYWNpdHk9IjAuMDYzMzMzMzMzMzMzMzMzMzQiIGZpbGw9IiMyMjIiICAvPjxyZWN0IHg9IjAiIHk9IjgyIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMyIgb3BhY2l0eT0iMC4wODkzMzMzMzMzMzMzMzMzMyIgZmlsbD0iI2RkZCIgIC8+PHJlY3QgeD0iMCIgeT0iMTEzIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMiIgb3BhY2l0eT0iMC4wODA2NjY2NjY2NjY2NjY2NiIgZmlsbD0iIzIyMiIgIC8+PHJlY3QgeD0iMC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1IiB5PSIwIiB3aWR0aD0iMTMiIGhlaWdodD0iMTAwJSIgb3BhY2l0eT0iMC4wODkzMzMzMzMzMzMzMzMzMyIgZmlsbD0iI2RkZCIgIC8+PHJlY3QgeD0iMzc3IiB5PSIwIiB3aWR0aD0iNSIgaGVpZ2h0PSIxMDAlIiBvcGFjaXR5PSIwLjAyIiBmaWxsPSIjZGRkIiAgLz48cmVjdCB4PSIzOTgiIHk9IjAiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxMDAlIiBvcGFjaXR5PSIwLjExNTMzMzMzMzMzMzMzMzM0IiBmaWxsPSIjMjIyIiAgLz48cmVjdCB4PSI0MzEiIHk9IjAiIHdpZHRoPSI5IiBoZWlnaHQ9IjEwMCUiIG9wYWNpdHk9IjAuMDU0NjY2NjY2NjY2NjY2NjciIGZpbGw9IiNkZGQiICAvPjwvc3ZnPg==
    

    As others have said, you can use base64 encoded image string as image and modern browsers understand it. If you decode this, it's like: data:<Type>, <Encoding>, <Encoded data string>

    So the image in question is a SVG image, when you open this in browser and try to save it using: Command+S/Ctrl+S, it will correctly identify image type to be svg.

  5. 2017-01-03 12:01

    Since everyone explained how to grab the base64 code of the image and paste it into a converter, there is another option. Even simpler: Open the page in question with Firefox. Select 'View Page Info' from the context menu. Select the 'Media' tab. Select the image from the list.

    No need to convert the base64 code. Firefox already provides you with the image and a 'Save As...' button.

  6. 2017-01-03 14:01

    Most importantly: don't put anything in the Internet you absolutely don't want people to download. Downloading images that you're not supposed to be able to download was one of the first tricks I learned in the early Netscape era and I'm not alone in this.

    If you want to sell image content, publish only a partial sample in low quality or add watermarks. Add some copyright notes stating that images are your property and it's not allowed to publish them anywhere else without your consent (or compensation) so that the buyer doesn't distribute them at will.

    Using base 64 encoding or such has its benefits. First of all the user cannot accidentally misclick the image as desktop background. And secondly one has to do some work to get the image so they're probably aware that they're not supposed to do it and probably consider whether it's worth the trouble. Also if it hampers image search engines then it seriously limits "unauthorized" copying.

    I have no statistics to back my words but in my experience UI design guys (and such) take a lot of content from image search results. And from UI sketches these images accidentally get into production or marketing etc. So basically if your image ends up in image search engines, the Internet owns it.

  7. 2017-01-03 15:01

    Knowledge is power:

    1. Open Chrome and go to https://guides.github.com/activities/hello-world/
    2. Right-click on the desired "image"
    3. Click "Inspect"
    4. Look in the Styles tab
    5. Right-click on element.style -> background-image -> url -> blue hyperlink containing data:image
    6. Click "Open link in new tab"
    7. Ctrl+s

    Basically, if your web browser renders something then it is save-able/download-able, period.

  8. 2017-01-03 23:01

    Also, is it possible that it's not an image but a graphic created by some code in javascript or some other language?

    Option 1

    Use svg tags in html. This still is not at all copy proof, but reduces options for copying to:

    • Looking at the source html and copying it
    • Screenshots

    Most graphic tools, photoshop, etc, have a vector or svg mode that can export the images you created in that mode as html tags that look like:

    <svg width="100" height="100">
      <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow"></circle>
    </svg>
    

    The user will not be able to right-click and save this image, but they will be able to inspect and steal the code itself.

    Option 2

    Use Javascript and HTML canvas to draw the image programmatically.

    Ways the user can copy:

    • Steal the JS code from the browser (super easy, but only useful if they're planning on displaying the image on some platform that supports canvas)
    • Screenshot

    .

    var canvas = document.getElementById('myCanvas');
    var context = canvas.getContext('2d');
    var centerX = canvas.width / 2;
    var centerY = canvas.height / 2;
    var radius = 70;
    context.beginPath();
    context.arc(centerX, centerY, radius, 0, 2 * Math.PI, false);
    context.fillStyle = 'green';
    context.fill();
    context.lineWidth = 5;
    context.strokeStyle = '#003300';
    context.stroke();
    

    My two cents, either use watermarks or low res versions of the images you're worried about. Anything you put on a website is trivial for anyone who knows what they're doing to copy. The above options are fun and interesting to think about, but ultimately are a lot of work for devs and defeated by a single key stroke.

    Last thought

    One last idea that might mitigate the ability of the average joe to copy, would be to require ten different keys to be held in order to see the image in particular. Like the other options, this is circumventable by anyone who knows what they're doing, but a normal user would have trouble hitting PrtScn while his other fingers are occupied. Not the best UX... but hey :)

◀ Go back