I'm using Codeigniter's upload library to upload images for user avatars. I'm also using [Jcrop](http://deepliquid.com/content/Jcrop_Manual.html#Introduction) which allows users to select an area to crop. 

[![enter image description here](https://i.stack.imgur.com/xBEBI.jpg)](https://i.stack.imgur.com/xBEBI.jpg)  

(source: [webresourcesource.com](http://www.webresourcesource.com/wp-content/uploads/2012/04/jcrop.jpg)) 

I'm saving all the coordinates of the selected area in text inputs which I'll use in php to crop. 

Is it possible to display the image selected before uploading?

Upload form:

```
<?php echo form_open_multipart('upload/do_upload');?>

<input type="file" name="userfile" size="20" />

<input type="submit" value="upload" />

</form>

```

If possible I'm trying to avoid heavy js for this or uploading 2 times. When choosing a file I notice that it shows the name of it:

![enter image description here](https://i.stack.imgur.com/x0Gpy.jpg)

Is there a way to use that functionality to retrieve the image path as well (path to the image in the uploader's computer)? In theory I'll be able to use that in image tags and display the image without js.