Is there a way to make an image displayable in one website only? - web

I need to make a website with an private image inside of <img /> tag, which mean you cannot view it any where outside that website. I need the image to not be displayed even if the user try to copy the src of the image and open it in another tab of the same browser.
Is it possible? If so, how can i achieve that?

Short answer: no. Long answer: not possible :-)
If you can get at it in any way (and you must be able to do that to get it to render in a browser), you can save it locally.
All someone would have to do is access it with a munged copy of a browser that saves all incoming data to disk.

There are ways to obfuscate the image so that the user won't be able to just copy and paste the URL, you can use the Javascript Image object to create a new image and drawImage to draw it into a canvas, however you'll still need to obtain the image data somehow, perhaps making an ajax request for the actual image on the server. However a really persistent user can inspect your javascript code and do some reverse engineering to get the image source.
A more naive user will just take an screenshot of the image and achieve the same effect.
So any attempt to try to prevent the user from copying the image is futile.

Related

trigger and fill image upload from url via chrome extension

I'm currently working on a chrome extension that injects a content script into a webpage that allows the user to autofill a form, and everything seems to be working correctly, with the text inputs. But I have not been able to figure out how to upload an image programmatically (simulating user input).
I need help creating a function that takes in a parameter of image url or data uri, and automatically triggers the file upload as if the user uploaded the image manually, to an input selector of my choice. End result should still keep the thumbnail and similar resolution intact.
Scope:
triggers file(image specifically) input automatically. Must include thumbnail and similar resolution intact
must include a parameter for image url/ or data uri
must include a parameter for input selector I target
must work from a chrome extension content script
must work on any file/image input on any page would be ideal
can be written in javascript or jquery, whichever you prefer
An extension that solves this problem perfectly can be found here, so I know this is possible, I just have not been able to replicate it: https://chrome.google.com/webstore/detail/upload-image-from-url/eiglgndkjiabiepkliiemoabepkkhacb. (the code is obfuscated, so I can't figure out how to replicate.

Send path of SDWebImage stored image to a UIWebView

I need to be able to get a path to images that cached.
While I am wondering if there is a way to do this using SDWebImage, I could probably get away with just having the knowledge to return a path to an image stored in the cache so I can display it within a uiwebview inside an image tag.
According to this https://github.com/rs/SDWebImage/issues/25 it would seem you can simply refer to the image by it's original url and it will be correctly picked up from cache.

How to customize the way objects/resources load from my website created with Joomla?

Suppose I want the browser to load an image right on the first connection it makes to my website. How do I do that, considering that by default the image loads later on when it's actually called for?
Also, after the whole page finishes loading, suppose I want to load more objects (say images) that aren't required yet but are just for buffer. How do I do that? Help me people, I've been at it for quite a long time.
I'm somewhat successful with the first problem by adding a script tag while actually calling an image at the beginning of my index.php's html head part which goes like:
<script src="http://www.mysite.com/my/image/url.png"></script>
But this I realize is bad scripting.
As for "Why would you want to do that?", it's for educational purposes and also because when someone visits my site, I need to load and display certain things before other things get loaded.
For preloading you probably could start with
<body onLoad="Preload('image1.jpg', 'image.gif', 'image.png', ...)">
And preload is a JavaScript function which adds each of the array of images to DOM like
document.imageArray[i].src = args[i];

User uploaded images drag/drop to a Raphael SVG then resize, rotate and fill path

This may be a bit long, but thank you in advance for any assistance.
I am trying to develop a web app that will allow the user to interact with a wireframe 'drawing' of a chosen product and customize each path with either an uploaded image, color/pattern or add whatever text...or all, if they choose (something similar to customizing a greeting card)...for THIS question, I will start with the image part....
Here is what I have so far: http://jsfiddle.net/rednevednav/C9aDm/
What's the most effective way to able to use any image...one that has been uploaded by the user...to append the fill of a selected path and then be able to drag it around, resize it and rotate BEHIND the selected path (so they can control the part of their image that gets 'cropped'? (*Note: I've searched for months and haven't found anyone else doing this outside of Flash....MyPublisher.com gets really close, but it's all squares and no SVG...I've looked at using ImageMagick and 'dst_in' on the server side...but after hard coding an image into svg...like on my jsfiddle...it seems that this could be done client side)
Should I be using Raphael for this application in the first place? Or?
**Hoping to stay within the Raphael framework (if using at all) in order to maintain the IE support afforded out-of-the-box that it provides; I understand that too much java hacking kills this. Of course, the 'finished' product will need to be downloaded as a .pdf....but that's another question for another time.
EDITED: # Thanks to an answer to my question HERE, I've update my JSFiddle with how to get URL from an uploaded image and use to fill path in Raphael paper. So that leaves 2 questions on this subject that I'm still struggling to resolve:
1. How to use this uploaded image to be able to drag and drop onto path to update fill?
2. How to first select which path I want the uploaded image to fill? (for when drag/drop is not available)
Thank you again in advance of any assistance!

Web image display in iPhone app

I am new to developing on the iPhone so am sorry if this is an easy question, but it has had me stumped for a little while.
Basically the app displays data retrieved from an XML feed. In that feed is an element that contains the path to an image. eg http://www.myserver.com/myimage.jpeg.
I want to be able to display that image in the list view of my iPhone app.
Most importantly, I don't want to stop the list drawing for each image, the rest of the data should be displayed immediately and then each image downloads and displays as quickly as data speed etc make it available.
What is the best way of downloading that image and displaying it?
Ideally can someone point to some working example code.
Thanks
Stephen
Displaying the image: you could create a UIWebView and just point it to the path - and then it's fully zoomable too.
Displaying in the list view:
//Somehow download your image...
cell.image = Your Image

Resources