Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File upload as image

Tags:

html

css

I was wondering how I go about making an file upload input appear as an image.

For example, Facebook and Twitter have image icons for their image file uploads.

Thank you,

Brian

like image 576
Brian Avatar asked Nov 22 '11 23:11

Brian


People also ask

How do you upload an image in HTML?

Copy and paste your image URL into an IMG tag, add a SRC to it. Identify first where you'd like to place your image within the HTML and insert the image tag, <img>. Then take your uploaded image, copy the URL and place it within your img parameters prefaced by a src.

What is file upload?

Uploading is the transmission of a file from one computer system to another, usually larger computer system. From a network user's point-of-view, to upload a file is to send it to another computer that is set up to receive it.


1 Answers

EXAMPLE fiddle

The 'input' has a style: display:none;, than just do:

$('#upload_img').click(function(){
    $('#upload').click();
});
like image 139
Roko C. Buljan Avatar answered Nov 11 '22 18:11

Roko C. Buljan