diff --git a/public/src/forum/admin/categories.js b/public/src/forum/admin/categories.js index 47cf72b80a..a46b92cc11 100644 --- a/public/src/forum/admin/categories.js +++ b/public/src/forum/admin/categories.js @@ -186,7 +186,9 @@ define(['uploader'], function(uploader) { var cid = $(this).parents('li[data-cid]').attr('data-cid'); uploader.open(RELATIVE_PATH + '/admin/category/uploadpicture', {cid:cid}, function(imageUrlOnServer) { inputEl.value = imageUrlOnServer; - $(inputEl).parents('li[data-cid]').find('.preview-box').css('background', 'url(' + imageUrlOnServer + '?' + new Date().getTime() + ')'); + var previewBox = $(inputEl).parents('li[data-cid]').find('.preview-box'); + previewBox.css('background', 'url(' + imageUrlOnServer + '?' + new Date().getTime() + ')') + .css('background-size', 'cover'); modified(inputEl); }); }); diff --git a/public/templates/admin/categories.tpl b/public/templates/admin/categories.tpl index 721b03ddf6..25018e3f58 100644 --- a/public/templates/admin/categories.tpl +++ b/public/templates/admin/categories.tpl @@ -15,7 +15,7 @@