diff --git a/webapp_utils.py b/webapp_utils.py index 901dd0d11..1ef58b9e7 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -547,11 +547,14 @@ def _get_image_file(base_dir: str, name: str, directory: str, banner_extensions = get_image_extensions() banner_file = '' banner_filename = '' + im_name = name + if name == 'banner': + im_name = 'image' for ext in banner_extensions: - banner_file_test = name + '.' + ext + banner_file_test = im_name + '.' + ext banner_filename_test = directory + '/' + banner_file_test if os.path.isfile(banner_filename_test): - banner_file = name + '_' + theme + '.' + ext + banner_file = banner_file_test banner_filename = banner_filename_test return banner_file, banner_filename # if not found then use the default image