The browser will cache the image in order to extract it from the cache 2 times.
But what you want to do in this situation is to let CSS do its job.
If these buttons are <a> , for example.
a { background: url('img/icons.png'); } .btn-1 { background-position:0 0; } .btn-2 { background-position: 0 -60px; }
source share