Linking to an image asset from a JavaScript file in Symfony 2
There might be a better way to retrieve the web directory, I would not know. However, there are other things to ponder upon.


Naming : loadBkrndImg -> loadBackgroundImage looks so much better
Naming : currentBkrndImgNum, enough said..
The background image number ought to be a parameter to loadBackgroundImage, not a global
You are creating an Image() object, assign the src value ( which can trigger the loading of the image ) , and then throw away the image. You could just put the url in a string.
You could preemptively centralize the retrieval of the asset folder


I would counter-suggest the following : 

function getAssetFolder( subfolder )
{
  var folder = '/bundles/macppages/';
  return subFolder ? ( folder + subfolder + "/" ) : folder
}

function loadBackgroundImage( number )
{
  var url = getAssetFolder( 'images' ) + 'bkrnd.0' + number + '.jpg';
  $('body').css("background-image","url('" + url + "')");
}