Search code examples
securitymobilesvgpiracy

Keep SVGs from Being Accessed by User


I'm putting together a mobile version of a webpage which consists entirely of client art. For the old-fashioned desktop version, I just used PNGs, but I really wanted to use SVG for mobile. SVGZ would be smaller and resolution independent, so it seemed like a perfect use case.

But the client is worried that, once his art is online in SVG, anyone could download the files and use his art illegally (he's had stuff he worked on pirated before, so he takes this pretty seriously.) This had never occurred to me until he brought it up, but the SVG would basically be his original source art.

I was wondering if there's any way to prevent the SVG files from being accessed by the user. As far I know this is impossible -- making the files available to the user-agent means making them available to the user -- but I wanted to ask around to be sure.

Thanks for any help.


Solution

  • No, this is impossible. If a web browser can request the files for display, then any computer anywhere can request the files and save the direct results.

    Serving up intentionally degraded artwork (e.g. rasterization) is the only way to prevent people from having the originals. Of course, a determined thief could still re-trace the PNG and get a vectorized, resolution-independent close approximation of the original.

    Your client could alternatively:

    • Include copyright comments in the source, proving ownership. (Yes, a thief could delete these.)
    • Include 'hidden' elements (0% opacity or placed under another item), proving ownership. (Yes, a thief could delete these.)
    • Use data steganography in the source SVG to watermark it (e.g. vary the decimal values in a path in a manner minor enough to not effect the result, but still embed custom data). (Yes, any thief suspecting this could lower decimal precision or transform all values in a manner that might remove this.)
    • Trust in the law to protect his works, or provide a recourse if they are stolen.
    • Trust in the goodness of most of mankind to not do this.
    • Decide that theft is the sincerest form of flattery, and not worry about it. :)