I am working on a website and creating my own gallery. However there seems to be a little problem with the code. I want to add my picture from my computer so it has the right width and height. Here is the code. I tried to do cover in CSS but some images are too big and won't fit. Thank you for reading.
<script type="text/javascript">
$('#button1').click(function()
{
$('#gallery').css("background-image", 'src=C:\Users\Eigenaar\Desktop\Nieuwe map\luffy');
//luffy serieuse kop
}); </script>
and this is my second button which works perfectly fine but also want to change because width and height problems
<script type="text/javascript">
$('#button2').click(function()
{
$('#gallery').css("background-image", "url(http://vignette3.wikia.nocookie.net/mvl/images/e/e9/Luffy-One-Piece.png/revision/latest?cb=20140221162732");
//luffy lachende kop
}); </script>
so what I want to know is how to add my own picture.