0

On publishing pages, you can insert pictures from your computer, then it asks you the destination folder where you want to put them

In my case it shows a Document Library, site assets and Image library.

Is there anyway that the Image library is the default? and that the user does not have to select?

  • are you using custom master page? – Aveenav Mar 28 '14 at 18:14
  • 2013 Server or online? – Aveenav Mar 28 '14 at 18:32
1

Using a JavaScript/Jquery approach:

Add the following CSS to your custom css file.

tr[id$='SelectListSection']{display: none;}

In your custom JS file add:

$(document).ready(function () {
  autoSelectDestinationLibrary();
});

function autoSelectDestinationLibrary() {
 if (document.URL.toLowerCase().indexOf('upload.aspx') != -1) {
    var ddDestLib = $("select[id$='AvailableDocLibs']");
    if (ddDestLib.length > 0) {
        $("select[id$='AvailableDocLibs'] option:contains('Images')").prop('selected', true);
        $("tr[id$='SelectListSection']").fadeIn('medium');
    }
 }
}

If you're on SP2013 on-prem you can:

  • create your own 'upload.aspx' and add the necessary logic.
  • Use customActions to tie it to particular list/library/content type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.