diff --git a/webapp_utils.py b/webapp_utils.py index 75c30bcf3..e3bbe47e6 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -475,6 +475,16 @@ def _getImageFile(baseDir: str, name: str, directory: str, bannerFile = name + '_' + theme + '.' + ext bannerFilename = bannerFilenameTest return bannerFile, bannerFilename + # if not found then use the default image + theme = 'default' + directory = baseDir + '/theme/' + theme + for ext in bannerExtensions: + bannerFileTest = name + '.' + ext + bannerFilenameTest = directory + '/' + bannerFileTest + if os.path.isfile(bannerFilenameTest): + bannerFile = name + '_' + theme + '.' + ext + bannerFilename = bannerFilenameTest + break return bannerFile, bannerFilename